|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
Setting Web Server Control Properties Programmatically (Visual Studio)
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)".
You set HTML server control properties slightly differently. For details, see.