WebPartManager.GetExportUrl Method (WebPart)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the relative virtual path and the query string that are part of the request when a user attempts to export a WebPart control.

Namespace:   System.Web.UI.WebControls.WebParts
Assembly:  System.Web (in System.Web.dll)

public string GetExportUrl(
	WebPart webPart


Type: System.Web.UI.WebControls.WebParts.WebPart

The WebPart that is being exported.

Return Value

Type: System.String

A string that contains the relative virtual path and the query string that together form the request to export a control.

The value returned by the GetExportUrl method is a relative virtual path to the server location of the page that contains the control, plus the appended query string value that forms the export request submitted to the server. The GetExportUrl method encodes the string before allowing the request to be submitted, to protect against malicious script attacks.


For more information about securing Web Parts applications, see Securing Web Parts Pages.

.NET Framework
Available since 2.0
Return to top