Setting a control's properties defines its appearance and behavior. This topic addresses how to set control properties declaratively.
To set server controls properties
In the ASP.NET Web page, set the attribute of the control declaration corresponding to the property you want.
The exact attribute you set depends on the control and the property. For information about the properties for a specific control, search for the name of the control class (for example, "Button class (System.Web.UI.WebControls)" in the Help index.
The following example shows how to set the property of a control:
В Copy Code
<asp:textbox id="TextBox1" runat=server maxlength=20 />
In Web server controls, any attribute that does not map to a property of the control is passed as-is to the browser.