共用方式為


SPWebPartManager.GetServerRelativeClassResourcePath method

取得指定的網頁組件類別中的伺服器相對 URL。

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public Shared Function GetServerRelativeClassResourcePath ( _
    web As SPWeb, _
    webPartType As Type _
) As String
'用途
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
)

參數

  • webPartType
    Type: System.Type

    指定的 Web 組件的型別。

傳回值

Type: System.String
指定的網頁組件類別伺服器相對 URL。

備註

這個方法會傳回指定的網頁組件類別的伺服器相對 URL。

請參閱

參照

SPWebPartManager class

SPWebPartManager members

Microsoft.SharePoint.WebPartPages namespace