passing variables from aspx page to ascx control

D

darrel

Is there a SOP for setting variables on an ASPX page that the usercontrols
on that page can read?

I'd like to set a 'template=' variable that various other controls can see
(the
header, navigation, footer, etc.).

Would simply setting a public variable be enough?

-Darrel
 
S

Saravana [MVP]

Yes, it is enough if you have public properties in the aspx page, you can
access those values using "Page" property of user control. Even you can
access all the controls in that page using this property.
 
D

darrel

Yes, it is enough if you have public properties in the aspx page, you can
access those values using "Page" property of user control.

Thanks, Saravana!

-Darrel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top