The following forum(s) have migrated to Microsoft Q&A: All English SharePoint forums! Visit Microsoft Q&A to post new questions.
How to set different master page for particular custom application page.
I have tried replacing dynamicmasterurl attribute at aspx page but no success
Also tried to add masterurl in preinit method but it gives error.
protected override void OnPreInit(EventArgs e) { this.MasterPageFile = "~/customMaster.master"; base.OnPreInit(e); }
yaşamak bir eylemdir
Hi,
Hope this may helps you
private const string MasterPageDirectory = "/_catalogs/masterpage/Welcome.master"; protected override void OnPreInit(EventArgs e) { base.OnPreInit(e); this.MasterPageFile =SPContext.Current.Site.ServerRelativeUrl+ MasterPageDirectory; }
Sundar
How are you replacing the dynmicmasterurl on the page? You shuld be able to use other master page using MasterPageFile attribute.
MasterPageFile="~/_layouts/minimal.master"
Also, please ensure that the master page you are trying to apply has the placeholder you are using on the application pages.
Hope it helps.
Regards,
Akhilesh Verma