c# - Change the master page from code behind -
I have a web page called MyPage.aspx and there are two master pages called Home Master and Blanke Master. By default, MyPage.aspx uses Home.Master. But depending on some condition, I have to change the home page from home page.Sorry.Master. So, how to do this with the code back in C #? I mean how can the master page change from the back code?
Set it to Pre_Init
event:
Zero Page_transfer (Object Sender, EventErgus E) {Masterpage file = "~ / Master 1.master"; }
See some details and more options.
Comments
Post a Comment