Ideally, you don't want your user control, to care about what kind of page
it is on.
You can create a public property or method on your user control, and have
each page using the control be responsible for calling it on the user
control to pass it 'theSection'. The user control could then hang on to it
until needed.
You can also have all your pages using the control inherit from a base class
which has a theSection variable. The user control can then cast its page
object to this baseclass and get theSection.
"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:e3***************@TK2MSFTNGP10.phx.gbl...
I have a user control that is reused in 5 .aspx pages and references a
variable called "theSection" which is set in the class for each .aspx
page. If I only had one .aspx page, I would reference the variable "theSection"
like this.
myAspx1.theSection
How do I reference the selected .aspx page--any of which have the user
control within--as a variable so I don't have to you conditionals?
<aspxPageVariable>.theSection
--
_____
DC G