Skip to main content

Knowledge Base

Go Search
Home > Support > Knowledge Base > Pages > 71502.aspx  

Add a web part to a web part page 
Category: How-to 
Applies to: Kivati Studio 

This article contains information about how to add a Web Part to a Web Part Page.

Details

Web Parts are components that enable non-programmers to gather information they care about and customize the appearance of web pages.

To add a web part to a web part page, follow the steps below.

Before you begin:

  1. Create a site on your portal named “WebPartSite”.
  2. Create a web part page named “MyWebPartPage” in the Shared Documents document library.  Set its layout template to “Header, Footer, and 3 Columns”.

Steps:

  1. Open Kivati Studio and create new blank project.
  2. Add an Open Site task to your project and set the property WebUrl to “WebPartSite”.  You can find this task under the site category in the WSS task library. 
  3. Add an Open Web Part Page task to your project and set PageUrl = full path of the Web part page in the site (for example: / WebPartSite/Shared%20Documents/ MyWebPartPage.aspx).  You can find this task under the Web Part category in the WSS task library.  
  4. On the task added in step 3, chain the NewWebReference property from the Open Site task to the WebReference property on the Open Web Part Page task.  Create a dependency from the Open Site task to the Open Web Part Page task. 
  5. Add an Open Web Part Manager task to your project. You can find this task under the Web Part category in the WSS task library.
  6. On the Open Web Part Manager task, chain the Page property from the Open Web Part Page task to the Page property on the Open Web Part Manager task.  Create a dependency from the Open Web Part Page task to the Open Web Part Manager task.
  7. Add an Add Web Part task to your project.  You can find this task under the Web Part category in the WSS task library. Set the following property values:
    • DwpData = Path of *.dwp file.  This can be a project resource.
    • DwpDataEncoded = true if the DwpData is Base64-encoded; false otherwise.
    • ZoneID = TopColumnZone
    • ZoneIndex = 0
  8. Build and execute your project.

More Information

For more information about adding a Web Parts to a Web Part page, see the SharePoint SDK and documentation.

Last update: 5/19/2008 
Copyright 2000-2008 Kivati Software, LLC.
Home| Support| Terms of Use| Privacy| Legal