共用方式為


HttpUtility.UrlKeyValueEncode 方法 (Guid)

使用 URL 查詢字串中的 GUID,將編碼。

命名空間:  Microsoft.SharePoint.Client.Utilities
組件:  Microsoft.SharePoint.Client (在 Microsoft.SharePoint.Client.dll 中)

語法

'宣告
Public Shared Function UrlKeyValueEncode ( _
    guidKeyOrValueToEncode As Guid _
) As String
'用途
Dim guidKeyOrValueToEncode As Guid
Dim returnValue As String

returnValue = HttpUtility.UrlKeyValueEncode(guidKeyOrValueToEncode)
public static string UrlKeyValueEncode(
    Guid guidKeyOrValueToEncode
)

參數

傳回值

類型:System.String
編碼的字串。

備註

使用UrlKeyValueEncode(Guid)方法編碼來建構,而不傳遞現有的 URL,例如的 URL、 使用者輸入的 URL。

若要編碼,作為屬性值 URL 類型屬性指定的字串,使用HtmlUrlAttributeEncode()方法。

若要編碼 HTML 字串,使用HtmlEncode(String)方法。

請參閱

參照

HttpUtility 類別

HttpUtility 成員

UrlKeyValueEncode 多載

Microsoft.SharePoint.Client.Utilities 命名空間