Share via


SPWebPartManager.GetServerRelativeClassResourcePath Method

Gets the server relative URL for a specified Web Part class.

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

Syntax

'Declaration
Public Shared Function GetServerRelativeClassResourcePath ( _
    web As SPWeb, _
    webPartType As Type _
) As String
'Usage
Dim web As SPWeb
Dim webPartType As Type
Dim returnValue As String

returnValue = SPWebPartManager.GetServerRelativeClassResourcePath(web, _
    webPartType)
public static string GetServerRelativeClassResourcePath(
    SPWeb web,
    Type webPartType
)

Parameters

  • webPartType
    Type: System.Type

    The type of a specified Web Part.

Return Value

Type: System.String
The server relative URL for a specified Web Part class.

Remarks

This method returns the server relative URL for a specified Web Part class.

See Also

Reference

SPWebPartManager Class

SPWebPartManager Members

Microsoft.SharePoint.WebPartPages Namespace