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
Post a Comment