read variable from content page to usercontrol in masterpage

  • Thread starter Thread starter Shailesh Patel
  • Start date Start date
S

Shailesh Patel

Hi,
I havea variable in cotent page. I want to read that variable into
usercontrol located in master page.
Is there any trick to read it in usercontrol?

Thank you in advance.

Shailesh
 
the proper way is to define an interface (in app_code) and have pages
that have the variable implement the interface. then the master page can
just cast this.Page to the interface and access the variable. this way
the master page can easily detect pages that do not.


-- bruce (sqlwork.com)
 
Hi Bruce,
Can you please give me some short example to understand better.
I apperetiate your feedback.

Thank you.
 
Another way is to raise an event in the page and capture or handle the event in the user control.

I have shared this approach over at:
 
Back
Top