Asp.net Master Page control dynamically through code behind
-
03-07-2019 - |
Question
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.
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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow