SPEncode.WriteHtmlEncodeWithQuote Method

Encodes the specified string so that characters in embedded HTML tags are displayed as text in the browser, and writes the string in quotation marks to the HTTP output content stream.

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

Syntax

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

Parameters

  • quoteChar
    Type: System.Char

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

Remarks

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

This method replaces multiple spaces in the string with a single space.

See Also

Reference

SPEncode Class

SPEncode Members

Microsoft.SharePoint.Utilities Namespace