次の方法で共有


HttpUtility.HtmlEncode method (String)

Encodes the specified string for use as text between HTML tags, or as an attribute value inside an HTML tag.

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

Syntax

'Declaration
Public Shared Function HtmlEncode ( _
    valueToEncode As String _
) As String
'Usage
Dim valueToEncode As String
Dim returnValue As String

returnValue = HttpUtility.HtmlEncode(valueToEncode)
public static string HtmlEncode(
    string valueToEncode
)

Parameters

Return value

Type: System.String
A String representation of the encoded value.

Remarks

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

See also

Reference

HttpUtility class

HttpUtility members

HtmlEncode overload

Microsoft.SharePoint.Client.Utilities namespace