ASP.NET Web Forms Web Forms Server Controls Programming Web Forms Server Controls
Setting a control’s properties defines its appearance and behavior. This topic addresses how to set control properties at design time.
Control properties can be set as part of a control’s declaration.
NOTE: In Web server controls, the property names do not have the same names as HTML attributes; be sure you are using the correct property name.
The following example sets the MaxLength property of an HtmlInputText HTML server control:
<INPUT id="myTextBox" type=text runat=server maxlength=20>
The following example sets the TextBoxMode property of TextBox ASP.NET control:
<asp:TextBox Text="Hi" runat=server TextBoxMode=Multiline />
Setting Web Server Control Properties Programmatically Setting HTML Server Control Properties Programmatically Web Forms Server Controls and CSS Styles
© 2025 Reynald Nuñez and asp.net.ph. All rights reserved. If you have any question, comment or suggestion about this site, please send us a note