This topic has not yet been rated - Rate this topic

SPLimitedWebPartManager.ImportWebPart Method

Imports an XML description file (*.dwp or *.webpart) that contains state and property data for a Web Part, and applies the data to the Web Part.

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
[ClientCallableExceptionConstraintAttribute(FixedId = "Microsoft.SharePoint.WebPartPages.WebPartPageUserException$0", 
	ErrorType = typeof(WebPartPageUserException), Condition = "The provided Web Part markup is not in the .dwp or .webpart format.")]
public WebPart ImportWebPart(
	XmlReader reader,
	out string errorMessage
)

Parameters

reader
Type: System.Xml.XmlReader
errorMessage
Type: System.String%
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ