次の方法で共有


SPHttpUtility.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.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

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

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

Parameters

Return value

Type: System.String
The encoded string.

Remarks

The HtmlEncode method replaces ampersand, double-quotation, single-quotation, less-than, and greater-than characters with the appropriate entity references.

See also

Reference

SPHttpUtility class

SPHttpUtility members

HtmlEncode overload

Microsoft.SharePoint.Utilities namespace