A page call B page's methods?

  • Thread starter Thread starter Elliot
  • Start date Start date
E

Elliot

There is a C# page a.aspx which has a master page b.aspx.
b.aspx has panels & methods.
I would like to know is it possible to change those panels' visibility or
call thoese methods in a.aspx?
Thanks for answering.
 
Elliot said:
There is a C# page a.aspx which has a master page b.aspx.
b.aspx has panels & methods.
I would like to know is it possible to change those panels' visibility
or call thoese methods in a.aspx?
Thanks for answering.

You just get the reference to the master page and cast it to the actual
class of your master page, then you can access it's members.

Example:

((b)Page.Master).SomeMethod();
 
Back
Top