WebPartGalleryItemBase.InstantiateFromXml Method (XmlDocument)

Instantiates a WebPart with the specified XmlDocument.

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Protected Function InstantiateFromXml ( _
    webPartXml As XmlDocument _
) As WebPart
'Usage
Dim webPartXml As XmlDocument
Dim returnValue As WebPart

returnValue = Me.InstantiateFromXml(webPartXml)
protected WebPart InstantiateFromXml(
    XmlDocument webPartXml
)

Parameters

Return Value

Type: System.Web.UI.WebControls.WebParts.WebPart
The instantiated Web Part.

Remarks

This method instantiates and returns a WebPart by using the specified Web Part XML document.

See Also

Reference

WebPartGalleryItemBase Class

WebPartGalleryItemBase Members

InstantiateFromXml Overload

Microsoft.SharePoint.WebPartPages Namespace