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)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
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.Int32The 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.