Do not use the value property. If you are using asp.net TextBox , you must use Text .
When you add properties that do not exist in the TextBox class, asp.net will map these properties to the resulting html. So
<asp:TextBox runat="server" ID="Name" text="bbbb" mycustomproperty="hi" />
Something like this will be displayed
<input type="text" value="bbbb" id="..." name="..." mycustomproperty="hi"/>
If you omit the TextBox Text property and write the value property, then the value property will be displayed.
<asp:TextBox runat="server" ID="Name" value="aaaa" />
For
<input type="text" value="aaaa" id="..." name="..."/>
TextBox does not have a Value property. When an instance of the TextBox is created, the HTML value property will be assigned to the Text property, and therefore, to access the Text property, it has the value "aaaa".
Summary Do not use the value property when using ASP.NET controls. Use the special properties of controls.
source share