5

How can you programmatically determine if a site collection is running in '14 compatibility mode' (so it looks like SharePoint 2010)?

8

You can check SPWeb.UIVersion to see what UI version the site is currently using:

switch(web.UIVersion)
{
    case 3:
        // 2007
        break;

    case 4:
        // 2010 & 2013 "14 mode"
        break;

    case 15:
        // 2013
        break;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.