R – Asp.net Master Page control dynamically through code behind

asp.netdynamicmastermaster-pages

I am having 2 Master Pages and I want to Switch Master page depending on the site, so I want to handle switching the master in code behind.

Best Solution

This is actually pretty easy to do. Check out http://odetocode.com/Articles/450.aspx for a detailed look at it.

Basically, you are going to override the PreInit handler and specify the page you want to use.

Related Question