Redigera

Dela via


Add items to a SharePoint project

SharePoint solutions contain one or more projects, each of which contains multiple SharePoint project items. After you open or create a SharePoint solution, you can add either new or existing items to these projects. For example, new workflow projects come with a default form that's named default.aspx, but you can replace that form with a new or different form, or add another ASPX form.

To add a new project item to a SharePoint solution

  1. In Visual Studio, open or create a SharePoint solution.

  2. In Solution Explorer, choose the project's node.

  3. On the menu bar, choose Project > Add New Item to display the Add New Item dialog box.

  4. In the Installed Templates list, expand the SharePoint node, and then choose the 2010 node.

  5. In the list of project item templates, choose a template.

  6. In the Name text box, enter a name, and then choose the OK button.

To add an existing project item to a SharePoint solution

  1. In Visual Studio, open or create a SharePoint solution.

  2. In Solution Explorer, choose the project's node.

  3. On the menu bar, choose Project > Add Existing Item to display the Add Existing Item dialog box.

  4. Browse to the folder that contains the item that you want to add, choose it, and then choose the Add button.