Dot Net Mafia

Group site for developer blogs dealing with (usually) Ionic, .NET, SharePoint, Office 365, Mobile Development, and other Microsoft products, as well as some discussion of general programming related concepts.

This Blog



Corey Roth [MVP]

A SharePoint MVP bringing you the latest time saving tips for Ionic, SharePoint, and Office 365.

Programmatically Changing the UI Version in SP2010

In SharePoint 2010, there is the concept of a UI Version and it has a value of 3 or 4.  When you upgrade your existing site, it will leave you at Version 3 which looks just like WSS3.  However, you have the capability to upgrade to the new SharePoint 2010 visualizations which is version 4.  If the administrators have the options enabled, you can change your UI version using the UI itself.  It provides the capability to run on Version 3 but get a preview of 4 and then ultimately they can convert to version 4 completely.  However, you may want to do this programmatically or you may want to revert back to version 3 after you have turned off preview mode.  This quick snippet of code is how you do it. 

using (SPSite siteCollection = new SPSite("http://sp2010-server"))


    SPWeb site = siteCollection.OpenWeb()


        site.UIVersion = 3;

        site.UIVersionConfigurationEnabled = true;




Here, we are using the new UIVersion property and we are reverting back to Version 3.  I’m also enabled the Version Configuration in the User Interface.



Twitter Trackbacks for Programmatically Changing the UI Version in SP2010 - Corey Roth - - Tip of the Day [] on said:

Pingback from  Twitter Trackbacks for                 Programmatically Changing the UI Version in SP2010 - Corey Roth - - Tip of the Day         []        on

November 24, 2009 12:46 PM

Muhanad Omar said:

This can also be done using PowerShell.

$site = Get-SPSite("http://portal")

$web = $site.OpenWeb()

$web.UIVersion = 3




Thanks to Tobias Zimmergren for the tip.


November 24, 2009 7:27 PM

karthik said:

We upgraded from MOSS 2007 to sarepoint 2010. When are successful applying the master page and keep the old site's look and feel same as the old one. But when ev

I tried it but theer a new site is created they are having the new look and feel,

Can I get the newly created sites too get the older version.

Or is there something I am missing?

Is there a script I can use? or is there any other solution

October 6, 2010 2:45 PM

Dias said:

I did it, but it doesnt help, any clue?

November 21, 2012 12:50 AM

Leave a Comment


About CoreyRoth

Corey Roth is an independent SharePoint consultant specializing in ECM, Apps, and Search.
2018 dotnetmafia.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems