Skip to Main Content
Essential SharePoint
book

Essential SharePoint

by Jeff Webb
May 2005
Beginner content levelBeginner
336 pages
10h 14m
English
O'Reilly Media, Inc.
Content preview from Essential SharePoint

Creating a Web Part Project

Before you can start writing code for a web part, you need to set a few things up so that you can debug and test the component from within SharePoint:

  1. Create a test page in SharePoint.

  2. Create and configure a new project.

  3. Build and sign the assembly; then extract the token.

  4. Register the web part Web.config.

  5. Add the web part to the test page to verify that everything works.

The following sections describe these tasks in more detail.

Creating a Test Page

Since web part projects are class libraries, they require a context within which to run. It is a good idea to create a document library of web part pages on your development server for debugging and/or testing purposes. Using a document library helps organize the test pages and makes it easier to create/modify them.

To create a test web part page library:

  1. From SharePoint on the development server, choose Create Document Library. SharePoint displays the New Document Library page.

  2. Enter the name TestPages, select the Web Part Page document template, and choose Create. SharePoint creates a new document library.

  3. Choose New Document to create a new, empty web part page named Test1.

  4. Write down the address of the new page. You'll use that address when configuring the project.

Configuring a New Project

To create and configure a new web part project in Visual Studio:

  1. From Visual Studio, choose File New Project, select the Web Part Library template from the Visual Basic .NET or Visual C# project type, and choose OK. Visual Studio ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

SharePoint User's Guide

SharePoint User's Guide

Infusion Development Corp. (Infusion Development Corporation)
Beginning SharePoint® 2010: Building Business Solutions with SharePoint

Beginning SharePoint® 2010: Building Business Solutions with SharePoint

Amanda Perran, Shane Perran, Jennifer Mason, Laura Rogers

Publisher Resources

ISBN: 0596008805Errata Page