ASCX Page

tehon3299

Well-known member
Joined
Jan 6, 2003
Messages
155
Location
Liverpool, NY
I have an ASCX page in C# for file uploads and an ASPX page that references the ASCX page. I need to reference a variable in the ASCX page that is public. How can I reference that on my ASPX page??
 
You need to declare a new instance of the ASCX control, and then
you can access its public variable. If youve added the control to
the ASPX page, then a new instance of the control will be created
at runtime automatically, so to get the variable you can just
access it through the ASCX controls name.

If myControl were the ASCX control, then you would use:
Code:
myControl.VariableName
to get and set the value.
 
Back
Top