Home Cooker Classes Others Rice CookerGX
Classes  >  encoder  >  JavaScriptStringEncode(string)
encoder class : JavaScriptStringEncode(string) method

Description

Encodes a string.

Syntax

encoderInstance.JavaScriptStringEncode(string targetString)

Arguments

ClassNameDescription
stringtargetStringA string to encode.

Return value

ClassDescription
stringAn encoded string.

Sample code

//anyEncoder is an instance of the encoder type.

//jsString is a javascript code.

string encoded = anyEncoder.HtmlEncode(jsString);

Notes

It's a wrapper of the System.Web.HttpUtility.JavaScriptStringEncode(String).

Links for reference

Copyright © Rice All rights reserved.