Overview
Didn't you find yourself writing SPContext.Current.Site, SPSecurity.RunWithElevatedPrivileges and list.Items.Add() in most of your SharePoint projects ?
So Why Reinvent the wheel ?
SPCodeSnippets are the most commonly used SharePoint code snippets . They follow SharePoint development best practices.
Just integrate them into your visual studio , reuse the code and speed up your SharePoint development.
How to use SPCodeSnippets
As shown in the snapshots above, you can just right click in visual studio, choose SPCodeSnippets and select the snippet that you need.
Alternatively, some snippets come with Shortcuts as shown in the following snapshot.
Click Tab twice
Other Examples :
spcs --> SPContext.Current.Site;
spcw ---> SPContext.Current.Web;
CurrentUser ---> SPUser currentUser = web.CurrentUser;
How to install SPCodeSnippets ?
1) Extract the rar file.
2) Open Visual Studio 2005.
3) Open the code snippets manager ( Ctrl + K then Ctrl + B ) or from the tools menu.
4) Click Add and point to the folder where you extracted the snippets into.
5) Now you can use SPCodeSnippets .
Notes : The snippets are only for C# projects and tested for Visual Studio 2005
Didn't you find yourself writing SPContext.Current.Site, SPSecurity.RunWithElevatedPrivileges and list.Items.Add() in most of your SharePoint projects ?
So Why Reinvent the wheel ?
SPCodeSnippets are the most commonly used SharePoint code snippets . They follow SharePoint development best practices.
Just integrate them into your visual studio , reuse the code and speed up your SharePoint development.
How to use SPCodeSnippets
As shown in the snapshots above, you can just right click in visual studio, choose SPCodeSnippets and select the snippet that you need.
Alternatively, some snippets come with Shortcuts as shown in the following snapshot.
Click Tab twice
Other Examples :
spcs --> SPContext.Current.Site;
spcw ---> SPContext.Current.Web;
CurrentUser ---> SPUser currentUser = web.CurrentUser;
How to install SPCodeSnippets ?
1) Extract the rar file.
2) Open Visual Studio 2005.
3) Open the code snippets manager ( Ctrl + K then Ctrl + B ) or from the tools menu.
4) Click Add and point to the folder where you extracted the snippets into.
5) Now you can use SPCodeSnippets .
Notes : The snippets are only for C# projects and tested for Visual Studio 2005