c# - Can we change the masterpage dynamically based on condition -


this question has answer here:

i have 2 master pages in project. based on role want use 1 of master page.

the master page changed in preint event

protected void page_preinit(object sender, eventargs e)     {         try         {             if (conduction1)                 this.page.masterpagefile = "~/masterpage.master";             else                 this.page.masterpagefile = "~/master.master";          }         catch (exception ex)         {          }     } 

Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -