access to masterpage methods

  • Thread starter Thread starter cruster
  • Start date Start date
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.
 
Yes, if you declare
<%@ MasterType virtualpath="~/MyMaster.master" %>

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

this.Master.MyPublicMember
 
Back
Top