asp.net.ph

Skip Navigation Links

Manipulating User Control Properties

ASP.NET Web Forms   Web Forms Server Controls   Web Forms User Controls


Once you have created a user control and specified properties on that control, you can change those property values both declaratively and programmatically. For example, in the user control defined in Creating a User Control, you can change the values of the UserID and Password properties.

To manipulate user control property values declaratively

  • Declare the property name and a value as an attribute/value pair in the user control tag. In the following example, if UserID represents the text property of a text box control contained in the myCtrls:Login user control, the default value for the property is declaratively set to "Enter ID here:".
<myCtrls:Login id="myLogin" UserID="Enter ID here:" Runat="server" />

To manipulate user control property values dynamically


See Also

Including a User Control in Another Web Forms Page   Defining Web Forms Event-Handling Methods   Handling User Control Events



© 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