access to masterpage methods

C

cruster

Hey folks.
I'd like to know if it's possible to define a method in masterpage
codebehind and then call it from the page, who uses the masterpage via
Master.something maybe.
Thanks.
 
E

Eliyahu Goldin

Yes, if you declare
<%@ MasterType virtualpath="~/MyMaster.master" %>

you will be able to access any public members of the master page:

this.Master.MyPublicMember
 

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,773
Messages
2,569,594
Members
45,123
Latest member
Layne6498
Top