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)

Syntax

'Declaration
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)
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