Adding Properties to Web User Controls
Adding a property to a Web user control is easy; just add a Property statement with Get and Set methods. For more details on the Property statement, see "Creating Properties" in Chapter 11.
For instance, in the WebUserControls example on the CD-ROM, as discussed in the In Depth section of this chapter, we added a property, DisplayColor, to a Web user control; here's the code that supports this property:
Private LabelColor As Color
Property DisplayColor() As Color
Set(ByVal Value As Color)
LabelColor = Value
Label1.BackColor = LabelColor
For more details on how this example works, take a look at the In Depth section of this chapter.