Get the calling page in Master Page
16Sep11
this.MainContent.Page.GetType().FullName
where MainContent is the main asp:ContentPlaceHolder. This technique is sort of looked down upon, but here it is.
Alternative method
Call the master page from the child page.
//Page_Load
MyMaster m = (MyMaster)this.Master;
m.TellMasterWhoIAm(this);
Advertisement
Filed under: .Net | Leave a Comment
Tags: ASP.Net, master pages, reflection
No Responses Yet to “Get the calling page in Master Page”