Creating a code-only web part (sandboxed solution)

In this recipe, we will develop a code-only web part that can be deployed as a sandboxed solution. For this recipe, we will create a data entry screen to add an item to a SharePoint list.

In this example, we will provide a user interface for bug reporting. Testers can come into the site and enter information about the bug they found during testing. The web part then inserts this data to a SharePoint list. Based on the category selected, we would associate the bug to a developer. In case we had a workflow associated with this list, we could have created a task for the developer and sent an alert about the entered bug.

Getting ready

Create a custom list named Bugs with columns Title, Description, ...

Get Microsoft SharePoint 2010 Development with Visual Studio 2010: Expert Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.