How to change the layout.master page?

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
1/28/2010 12:39:08 PM
Gravatar
Total Posts 21

How to change the layout.master page?

I have created an aspx page, and I would like this page alone use another layout.master, let say blank.master. However, when  I go into the aspx file, at the @page directive ad change the value for the MasterPageFile to "blank.master". The page is still using the site default layout.master.

Anyway idea why? I even try to use the "Page_PreInit" method to specify it to use "blank.master". It still does work.

Thanks in advance.

1/28/2010 2:29:53 PM
Gravatar
Total Posts 18439

Re: How to change the layout.master page?

If your page inherits from mojoBasePage I would try like this:

protected override void OnPreInit(EventArgs e)
{
 SetMasterInBasePage = false;
 base.OnPreInit(e);
 // your logic to set master page goes here


}

Hope it helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.