PageViewerWebPart Class

The PageViewerWebPart class displays content from a linked Web Page, folder, or file. This Web Part renders its content within an IFRAME element.

Microsoft.SharePoint.WebPartPages.WebPart

   Microsoft.SharePoint.WebControls.IDesignTimeHtmlProvider

Public Constructors

The following table shows the constructors of the PageViewerWebPart class and a brief description of each.

Name Description
PageViewerWebPart Initializes a new instance of the PageViewerWebPart class.

Public Methods

The following table shows the public methods of the PageViewerWebPart class and a brief description of each.

Name Description
CreateWebPartMenu Overrides the Microsoft.SharePoint.WebPartPages.WebPart.CreateWebPartMenu method.
GetDesignTimeHtml Gets the HTML that is used to represent the control at design time.
LoadResource(String) Overrides the Microsoft.SharePoint.WebPartPages.WebPart.LoadResource method. Returns a string that describes the localized Name, Category, and Description property values of the specified resource.
ShouldSerializeContentLink Indicates whether the ContentLink property should be persisted.
ShouldSerializeSourceType Indicates whether the SourceType property should be persisted.
GetToolParts Determines the tool parts that are displayed in the tool pane of the Web-based Web Part design user interface, and the order in which they are displayed.

Protected Methods

The following table shows the protected methods of the PageViewerWebPart class and a brief description of each.

Name Description
RenderWebPart(System.Web.UI.HtmlTextWriter) Overrides the Microsoft.SharePoint.WebPartPages.WebPart.RenderWebPartmethod to implement rendering for this Web Part.

Public Properties

The following table shows the public properties of the PageViewerWebPart class, the data type of each property, and a brief description of each.

Name Data Type Description
ContentLink String Gets and sets a URL or file path that provides content for this Web Part.
SourceType Microsoft.SharePoint.WebPartPages.PathPattern Gets and sets a PathPattern enumeration that indicates the type of link the Web Part persists in the ContentLink property.

Protected Properties

The following table shows the protected properties of the PageViewerWebPart class, the data type of each property, and a brief description of each.

Name Data Type Description
OverflowAuto Boolean Overrides the default Microsoft.SharePoint.WebPartPages.WebPart.OverflowAuto property behavior.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread safe.

Remarks

Use this Web Part to incorporate existing content (such as Web sites or documents) into a Web Part. This Web Part allows you to isolate a Web Part from the rest of the Web Part Page. The IFRAME element prevents script running in the Web Part from interfering with other Web Parts on the same page. The Page Viewer IFRAME element also allows you to display pages that contain a <Form> tag. Finally, this Web Part allows you to retrieve data from a server that requires authentication. In this case, the Page Viewer Web Part forwards authentication credentials from the client.

Requirements

Namespace: Microsoft.SharePoint.WebPartPages

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services (in Microsoft.SharePoint.dll)

Security: Code Access Security