Master page is to changed
-
Is possible to change the master page at runtime. tnx in adv.
Balasubramanian K.
-
Is possible to change the master page at runtime. tnx in adv.
Balasubramanian K.
yes u can Page.MasterPageFile = "name of master page"
-
Is possible to change the master page at runtime. tnx in adv.
Balasubramanian K.
yes. You can change it on
Page_PreInit()
Event
protected void Page_PreInit(object sender, EventArgs e) { if (Request.Params["PageName1"] != null) { this.MasterPageFile = "~/MasterPages/PageName1.master"; } else if (Request.Params["PageName2"] != null) { this.MasterPageFile = "~/MasterPages/PageName2.master"; } else { this.MasterPageFile = "~/MasterPages/Default.master"; }
} ;)cheers, Abhijit Read My Latest Article : IIS 7.0 and Deploying Asp.Net WebSites on IIS 7.0
-
yes u can Page.MasterPageFile = "name of master page"
yes and This should be write in
Page_PreInit()
Event .cheers, Abhijit Read My Latest Article : IIS 7.0 and Deploying Asp.Net WebSites on IIS 7.0
-
yes. You can change it on
Page_PreInit()
Event
protected void Page_PreInit(object sender, EventArgs e) { if (Request.Params["PageName1"] != null) { this.MasterPageFile = "~/MasterPages/PageName1.master"; } else if (Request.Params["PageName2"] != null) { this.MasterPageFile = "~/MasterPages/PageName2.master"; } else { this.MasterPageFile = "~/MasterPages/Default.master"; }
} ;)cheers, Abhijit Read My Latest Article : IIS 7.0 and Deploying Asp.Net WebSites on IIS 7.0
Yah.. thank you
Balasubramanian K.