HttpUtility.UrlKeyValueEncode 方法 (Int32)
將編碼整數索引鍵或使用 URL 查詢字串中的值。
命名空間: Microsoft.SharePoint.Client.Utilities
組件: Microsoft.SharePoint.Client (在 Microsoft.SharePoint.Client.dll 中)
語法
'宣告
Public Shared Function UrlKeyValueEncode ( _
keyOrValueToEncode As Integer _
) As String
'用途
Dim keyOrValueToEncode As Integer
Dim returnValue As String
returnValue = HttpUtility.UrlKeyValueEncode(keyOrValueToEncode)
public static string UrlKeyValueEncode(
int keyOrValueToEncode
)
參數
keyOrValueToEncode
類型:System.Int3232 位元整數鍵或要編碼的值。
傳回值
類型:System.String
編碼的字串。
備註
使用UrlKeyValueEncode(Guid)方法編碼來建構,而不傳遞現有的 URL,例如的 URL、 使用者輸入的 URL。
若要編碼,作為屬性值 URL 類型屬性指定的字串,使用HtmlUrlAttributeEncode()方法。
若要編碼 HTML 字串,使用HtmlEncode(String)方法。