Navigation

Thursday 14 November 2013

Creating SharePoint 2010 List Instances in Visual Studio 2010

We can easily create SharePoint 2010 List instances using visual studio 2010

Advantages:- 
  • If there is no need of custom list in any other SiteCollection other than in one site, it is no meaning to create list definitions. Instead we can create one list instance and deploy it to site directly.
  • After creating the new list instance we can add list data to Element file which will reduce the burden of creating list items every time that we deploy solution and even it will helps in the time of production site deployment.

Steps to Create:-
  1. In visual studio 2010 click on File -> New project then new project window will open.
  2. Then in Installed templates section of opened window select                     Visual C# ->SharePoint ->2010 -> then Empty SharePoint Project -> enter project name  -> then Ok - > Enter your site name and click on create. It will create project in visual studion.                                                                    
  3. After this in Solution Explorer Right click on your project then click on Add -> New item.
  4. Now in opened window select Online Templates -> List Instance and name your List then click on Add
  5. Now new List instance is added to your folder.

No comments:

Post a Comment