SPHttpUtility.EcmaScriptStringLiteralEncode method (String)

Returns an encoded version of the specified JavaScript.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Shared Function EcmaScriptStringLiteralEncode ( _
    scriptLiteralToEncode As String _
) As String
'Usage
Dim scriptLiteralToEncode As String
Dim returnValue As String

returnValue = SPHttpUtility.EcmaScriptStringLiteralEncode(scriptLiteralToEncode)
public static string EcmaScriptStringLiteralEncode(
    string scriptLiteralToEncode
)

Parameters

  • scriptLiteralToEncode
    Type: System.String

    A string that contains the JavaScript to encode.

Return value

Type: System.String
A string that contains the encoded version of the JavaScript.

Remarks

Ecma International develops standards for information and communication systems. For more information, see the official Web site for Ecma International at http://www.ecma-international.org/.

See also

Reference

SPHttpUtility class

SPHttpUtility members

EcmaScriptStringLiteralEncode overload

Microsoft.SharePoint.Utilities namespace