T
tshad
I have a User control that has some asp:textboxes and asp:labels in it where
I want to change the visibility and forecolor of these controls.
Right now I am getting and setting the .net controls using properties:
***************************************
Public Property FullName AS String
Get
Return objFullName.Text
End Get
Set
objFullName.Text = Value
End Set
End Property
Public Property Address1 AS String
Get
Return objAddress1.Text
End Get
Set
objAddress1.Text = Value
End Set
End Property
Public Property City AS String
Get
Return objContactCity.Text
End Get
Set
objCity.Text = Value
End Set
End Property
***************************************
But I can't use these properties to change other attributes. I could set up
other properties to do this but that would require setting up a lot of
properties something like:
*****************************************************
Public Property FullNameColor As Color
Get
Return FullName.ForeColor
End Get
Set
lblMessage.ForeColor = value
End Set
End Property
*****************************************************
Is this the best way to handle this?
Thanks,
Tom
I want to change the visibility and forecolor of these controls.
Right now I am getting and setting the .net controls using properties:
***************************************
Public Property FullName AS String
Get
Return objFullName.Text
End Get
Set
objFullName.Text = Value
End Set
End Property
Public Property Address1 AS String
Get
Return objAddress1.Text
End Get
Set
objAddress1.Text = Value
End Set
End Property
Public Property City AS String
Get
Return objContactCity.Text
End Get
Set
objCity.Text = Value
End Set
End Property
***************************************
But I can't use these properties to change other attributes. I could set up
other properties to do this but that would require setting up a lot of
properties something like:
*****************************************************
Public Property FullNameColor As Color
Get
Return FullName.ForeColor
End Get
Set
lblMessage.ForeColor = value
End Set
End Property
*****************************************************
Is this the best way to handle this?
Thanks,
Tom