Monthly Archives: November 2010

DISP_E_EXCEPTION and Disposing the SPContext.Current Objects

Have you ever came across the situation where user wanted to delete the web part from their page using the browser and they get following error message – “Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION)). If you have permission, you … Continue reading

Posted in SP2010 DEV General

Different Options to Create New Site Collection in the Specific Content Database in SharePoint 2010

If you want to create a new site collection in the specific database, there are several different options available in the SharePoint 2010. Option 1 => Central Administration (Good Approach) From the central administration site, you can create the site … Continue reading

Posted in SP2010 Admin PowerShell

SharePoint 2010 Development Environment and Account Permission Requirements CheckList

If you want to develop against the SharePoint 2010 sites with Visual Studio 2010, here are the high level development environment requirements and permissions to develop and debug against SharePoint environment. MSDN Article Reference: http://msdn.microsoft.com/en-us/library/ee231582.aspx Development Environment – SharePoint Development … Continue reading

Posted in SP2010 DEV General

Code Snippet – Programmatically Configure the Order By and Group By Properties of the SharePoint Lists and Document Libraries Views

If you want to set the Order By or Group By properties for the given list or document library views programmatically, you have to set the SPView Object’s Query property. Tip: To find the syntax for the CAML Query order … Continue reading

Posted in SP2010 Code Snippets

Code Snippet – Programmatically Add the Web Part on the SharePoint Web Part Page

Since MOSS 2007 days (including SharePoint 2010), users and developers can create the web part pages. I am sure it’s been blogged several different places but if you have web parts already deployed on the site collection web part gallery … Continue reading

Posted in SP2010 Code Snippets

Step by Step – Using C# Code in the PowerShell 2.0 Scripts

Have you ever had C# functions library and you wanted to reuse it in the PowerShell script instead of reinventing the wheels and translating the c# code into PowerShell. Thanks to the PowerShell 2.0’s new Add-Type Cmdlet demonstrated by the … Continue reading

Posted in SP2010 Dev PowerShell

Code Snippet – Programmatically Update the SharePoint Web Part Properties on the List Forms

If you ever want to update the web part properties on the out of the box SharePoint List forms programmatically, use the following code snippet. Thanks to Fransisco’s article for the inspiration. I have updated his code with better memory … Continue reading

Posted in SP2010 Code Snippets