Great and working article about how to put custom master page within application page. In my case this was custom display form for content type…
Thanks a lot for share this peace of code!
I came across a position, where i have an application page developed for user requirement and the user desires the look and feel of this page to me similar to other pages in the context.
I tried so many alternatives but didn’t get prospered; I found the right to use the default.master or custom master page for application pages.
First thing is that if you need to use a masterpage from the site context, you want to have the similar content placeholders as are expected by the master page.
Master pages can be loaded dynamically. This can be done by assigning a master page file to the MasterPageFile property in the Page object. This property may only be assigned in the Page PreInit event, this is the first event executed page execution lifecycle.
Copy and paste this below code in your custom application page and deploy the assembly to GAC…
View original post 73 more words