Udostępnij za pośrednictwem


Setting ASP.NET Server Control Properties Programmatically

You can set Web server control properties programmatically to change the control's appearance and behavior at run time. Properties for Web server controls are strongly typed, so the exact technique you use to set properties depends on what type of property you are setting. For example, setting a unit property such as width is different from setting a color property. The sections below provide details about setting different types of properties. For information about the properties for a specific control, search for the name of the control class in the Help index, such as "Button class (System.Web.UI.WebControls)".

Note

You set HTML server control properties slightly differently. For details, see How to: Set HTML Server Control Properties Programmatically.

In This Section

See Also

Concepts

ASP.NET Web Server Controls Overview

ASP.NET Web Pages Overview

Other Resources

Working with ASP.NET Web Server Controls