共用方式為


SPEncode.WriteHtmlEncodePreserveSpacesWithQuote method

會指定的字串的編碼,使內嵌的 HTML 標籤中的字元會顯示在瀏覽器中的文字字串寫入 HTTP 輸出內容資料流,,但會保留在字串中的多個空格和用以容納引號的字串。

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

Syntax

'宣告
Public Shared Sub WriteHtmlEncodePreserveSpacesWithQuote ( _
    response As HttpResponse, _
    str As String, _
    quoteChar As Char _
)
'用途
Dim response As HttpResponse
Dim str As String
Dim quoteChar As CharSPEncode.WriteHtmlEncodePreserveSpacesWithQuote(response, _
    str, quoteChar)
public static void WriteHtmlEncodePreserveSpacesWithQuote(
    HttpResponse response,
    string str,
    char quoteChar
)

參數

  • quoteChar
    Type: System.Char

    會指定要用於引號字元 System.Char 物件。

備註

WriteHtmlEncodePreserveSpaces方法會將轉換可以與實體的 HTML 標籤混淆的字元。例如,"<"轉換成"& lt;"。

請參閱

參照

SPEncode class

SPEncode members

Microsoft.SharePoint.Utilities namespace