Category Archives: SP2010 Code Snippets

Code Snippet – Programmatically Retrieve Localized SharePoint User Profile Properties Label

Please note this code snippet has been tested on SharePoint 2010 using Visual Studio 2012. It should work fine with SharePoint 2013. If you are working on multi-lingual or support multiple languages in your SharePoint application, there might be at … Continue reading

Posted in SharePoint 2010, SP2010 Code Snippets | Leave a comment

Magical SPUtility Class – A Hidden Jewel for SharePoint Custom Development

I have been using SPUtility ever since I have started building Custom SharePoint Applications but once in a while I come across SPUtility functions to solve problems which I normally either find myself in the corner or scratch my head … Continue reading

Posted in SP2010 Code Snippets | Leave a comment

Code Snippet – Programmatically Access Root Site Collection in Multi-Site Collection Heirarchy

It’s fairly common need in multi-site collection environment to access root site collection programmatically from the current sub site collection or sub site. It’s kind of ironic that one of my colleagues asked me same question while working on our … Continue reading

Posted in SP2010 Code Snippets

Code Snippet – Programmatically Create Web Application Managed Paths in SharePoint 2010

While creating site collections, it is fairly common to create site collections at the more user friendly URLs. By default, each web application has two managed paths – Explicitly named single site collection managed path “(root)” which would allow only … Continue reading

Posted in SP2010 Code Snippets

Code Snippet – How to Check if SharePoint Site Collection or Sub Site Exists

Recently I have been focusing on building site provisioning tool for one of my clients and one of the most important code snippets was to check whether given site collection or sub site exists whenever end-user requests new site collection … Continue reading

Posted in SP2010 Code Snippets | 1 Comment