HttpUtility.HtmlEncode Method (String, TextWriter)

Encodes the specified string as a text string to be enclosed in HTML tags, or as an attribute value inside an HTML tag, and appends it to the specified output stream.

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

Syntax

'Declaration
Public Shared Sub HtmlEncode ( _
    valueToEncode As String, _
    output As TextWriter _
)
'Usage
Dim valueToEncode As String
Dim output As TextWriterHttpUtility.HtmlEncode(valueToEncode, output)
public static void HtmlEncode(
    string valueToEncode,
    TextWriter output
)

Parameters

Remarks

The HtmlEncode(String) method replaces the ampersand (&), double-quotation (“”), single-quotation (‘’), less-than (≤), and greater-than (≥) characters with the appropriate characters.

This method does not enclose the resulting string in quotation marks.

See Also

Reference

HttpUtility Class

HttpUtility Members

HtmlEncode Overload

Microsoft.SharePoint.Client.Utilities Namespace