Running a MasterPage method from within default.aspx?

S

Steve Kershaw

Hi,

I have an ASP.NET application with a MasterPage that has a method
defined as public. Now I want to run this MasterPage method from
INSIDE the default.aspx page.

I know there has to be a way of doing this!

Anybody know?

Thanks
Steve
 
G

Guest

Easy:
Just define your master page in the page (HTML) declaration section as
follows:
<%@ masterType TypeName="MyMasterClassName" %>
and then inside your code behind you will be able to write:
Master.MyMasterPublicMethod
 

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

Top