Change UIVersion Of SharePoint 2010

Sometimes we need to change the UIVersion of sharepoint site on sharepoint 2010 for it looks like sharepoint 2007 site,there are two ways to achieve.

First one ,we can use SharePoint 2010 Management Shell tool,just put the following command:

View Code
1 $myWeb = Get-SPWeb http://YourSiteURL
2 $myWeb.UIVersion = 3
3 $myWeb.UIVersionConfigurationEnabled = $true
4 $myWeb.Update()

The other one,we can use visual studio to run the following code:

1 using (SPSite mySite = new SPSite("http://YourSiteURL"))
2 {
3 using (SPWeb myWeb = mySite.OpenWeb())
4 {
5 myWeb.UIVersion = 3;
6 myWeb.UIVersionConfigurationEnabled = true;
7 myWeb.Update();
8 }
9 }


 

posted @ 2012-03-01 16:14  Statmoon  阅读(299)  评论(0编辑  收藏  举报