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 }


 

作者:Statmoon
         
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
posted @ 2012-03-01 16:14  Statmoon  阅读(272)  评论(0编辑  收藏  举报