A page call B page's methods?

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.
 
G

Göran Andersson

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();
 

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,772
Messages
2,569,593
Members
45,111
Latest member
VetaMcRae
Top