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)

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