SPHttpUtility.HtmlEncode Method (Guid)

Encodes the string with the specified GUID 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)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

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

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

Parameters

  • valueToEncode
    Type: System.Guid

    A System.Guid object that contains a GUID.

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