다음을 통해 공유


SPEncode.WriteHtmlEncodePreserveSpacesWithQuote Method

Encodes the specified string so that characters in embedded HTML tags are displayed as text in the browser and writes the string to the HTTP output content stream, but preserves multiple spaces within the string and surrounds the string with quotation marks.

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

Syntax

'Declaration
<SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.UnsupportedExternalType)> _
Public Shared Sub WriteHtmlEncodePreserveSpacesWithQuote ( _
    response As HttpResponse, _
    str As String, _
    quoteChar As Char _
)
'Usage
Dim response As HttpResponse
Dim str As String
Dim quoteChar As CharSPEncode.WriteHtmlEncodePreserveSpacesWithQuote(response, _
    str, quoteChar)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.UnsupportedExternalType)]
public static void WriteHtmlEncodePreserveSpacesWithQuote(
    HttpResponse response,
    string str,
    char quoteChar
)

Parameters

  • quoteChar
    Type: System.Char

    A System.Char object that specifies the character to use for quotation marks.

Remarks

The WriteHtmlEncodePreserveSpaces method converts characters that can be confused with HTML tags to entities. For example, "<" is converted to "&lt;".

See Also

Reference

SPEncode Class

SPEncode Members

Microsoft.SharePoint.Utilities Namespace