Change master page according to variable defined
In Visual Webpart, how can i change the master page according to variable defined
March 29th, 2015 6:16am

You can update the master page programmatically based on the variables you have

SPSite site new SPSite("http://Foo");
SPWeb web=site.OpenWeb();
rootWeb.CustomMasterUrl = rootWeb.ServerRelativeUrl + "/_catalogs/masterpage/blueband.master";
rootWeb.update();
https://social.msdn.microsoft.com/Forums/sharepoint/en-US/2401df2d-ed12-45c6-acd9-40163e7f8515/changing-master-page-programmatically

Free Windows Admin Tool Kit Click here and download it now
March 29th, 2015 10:41pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics