ASP.NET HTML text input field get and set value

In our asp.net application if we use html text input field for jquery or like other as we need we can

Get the input field value :

  <input type="text" name="std" id="datepicker5" />  

in C#

  string startDatepicker = String.Format("{0}", Request.Form["std"]);  


Set the input Field :

  <input type="text"  id="datepicker5" value="<%= this.FromDate %>"/>  

in C#

    // declare a from attribute   
     protected string FromDate { get; set; }  
     protected void Page_Load(object sender, EventArgs e)  
     {  
       // setting value  
        this.FromDate = DateTime.Now.ToShortDateString();  
     }  


              Here it is important till now i not get any solution that set and get will work on same HTML text input field.

Popular posts from this blog

WPF Crystal Report Viewer Using SAP

mvc razor textboxfor change event change another textboxfor value

ASP.NET MVC razor SAP Crystal report