Hello,
I have two UserControls on a aspx page. I need to read a property of the
first UserControl from within the second UserControl. The UserControls
only know about themselves, so I can't declare a variable of the other
usercontrol's type. So I can't do something like this in the second
UserControl:
FirstUserContro l first =
(FirstUserContr ol)this.Parent. FindControl("Fi rstUserControl" )
Additionally I don't like to use the FindControl method, because it
returns an Object.
What's the best way to get to a usercontrol's properties from within an
other user control?
Greetings,
Chris
*** Sent via Developersdex http://www.developersdex.com ***
I have two UserControls on a aspx page. I need to read a property of the
first UserControl from within the second UserControl. The UserControls
only know about themselves, so I can't declare a variable of the other
usercontrol's type. So I can't do something like this in the second
UserControl:
FirstUserContro l first =
(FirstUserContr ol)this.Parent. FindControl("Fi rstUserControl" )
Additionally I don't like to use the FindControl method, because it
returns an Object.
What's the best way to get to a usercontrol's properties from within an
other user control?
Greetings,
Chris
*** Sent via Developersdex http://www.developersdex.com ***
Comment