O'Reilly logo

Microsoft SharePoint 2010 Developer's Compendium: The Best of Packt for Extending SharePoint by Carl Jones

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a list definition

In all the previous recipes, when we deployed the content type, we had to manually create a list based on the content type using the SharePoint UI. We can create list instances based on the content type using Visual Studio without going through the SharePoint UI.

In this recipe, we will create a custom content type called an Expense content type and based on that content type, we will create a list Definition and list Instance.

Our Expense content type will be based on an Item content type and will have three fields named Title, Amount, and Expense category which is a choice field.

Getting ready

You should have completed the previous recipes successfully.

How to do it...

  1. Launch your Visual Studio 2010 IDE as an administrator ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required