Best Coding Practices in SharePoint – Part1

Introduction This post covers some of the best coding practices that should be followed in SharePoint development. We will also see of the bad practices and why we should avoid them. It is highly essential that everyone involved with SharePoint should know about these best practices. I am providing in various series due to high […]

June 12, 2014 · Adi · No Comments
Tags: , , ,  · Posted in: Best Practices and Standards, C#, Sharepoint 2010, SharePoint 2013

Code Snippet – Creating context objects in SharePoint 2013 / 2010

Introduction Code snippet how to create site context objects using Server Object Model, Managed Client Object Model, Silver Light Object Model, Javascript Object Model in SharePoint 2013/2010

January 19, 2014 · Adi · No Comments
Tags: , , ,  · Posted in: C#, Sharepoint 2010, SharePoint 2013

Tip – Using F3 key in PowerShell

Tip – Using F3 key in PowerShell window Pressing the F3 function key in the console window displays the last-executed statement on the current prompt line. Using the up and down arrows, you can page through the other previous statements. This is useful for repeating or correcting previous command entries.

December 7, 2013 · Adi · No Comments
Tags: , ,  · Posted in: Powershell, Sharepoint 2010, SharePoint 2013, Tips and Tricks

Tip – Timer Job Constructor in SharePoint

Tip – Timer Job Constructor Default constructor in timer job class is mandatory else you end up with the error “TimerJobxxx cannot be deserialized because it does not have a public default constructor.” when activating the feature that installs the job. You should have constructor like below code

November 2, 2013 · Adi · No Comments
Tags: , ,  · Posted in: C#, Sharepoint 2010, Tips and Tricks

Modifying web.config in SharePoint

Introduction This post covers how to modify web.config through object model in SharePoint. Changes to the web.config should not be done manually which is a bad practice. Modifications should be done through SPWebConfigModification class object and the complete track of changes will be saved in configuration database. This is the best practice to be used […]

November 2, 2013 · Adi · No Comments
Tags: , , ,  · Posted in: C#, Sharepoint 2010

Download files as Zip File in SharePoint

Introduction In this post we will see how to download selected document library items as zip file. The zip file creation api is from open source code of icsharpcode.net Skill Level – Medium

August 11, 2013 · Adi · 48 Comments
Tags: , , , , ,  · Posted in: C#, Sharepoint 2007, Sharepoint 2010, SharePoint 2013

Move Folders of SharePoint Document Library using object model

Introduction SharePoint does not support moving folders directly but in this post we will see how we can achieve move folders of SharePoint document library to one location to another using object model. We will also see how to keep same folder Version, Modified and ModifiedBy values after moving The post includes Moving folder along […]

August 10, 2013 · Adi · 4 Comments
Tags: , , , , ,  · Posted in: C#, Sharepoint 2007, Sharepoint 2010, SharePoint 2013