SPHttpUtility.HtmlEncode method (Int32)

Retrieves the specified integer as a text string to be enclosed in HTML tags, or 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 Integer _
) As String
'Usage
Dim valueToEncode As Integer
Dim returnValue As String

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

Parameters

  • valueToEncode
    Type: System.Int32

    The integer to be encoded.

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