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, Category, and Developer. The Description column is of multiple lines of text type, whereas others are single lines of text type. All the columns are required.
How to do it...
Launch your Visual Studio 2010 IDE as an administrator (right-click on the shortcut...