passing variables from aspx page to ascx control

  • Thread starter Thread starter darrel
  • Start date Start date
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
 
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.
 
Back
Top