Shunde.NET Framework Class Library

TextUtils.JavascriptStringEncode Method 

Converts a string so that it can be used as a javascript string

public static string JavascriptStringEncode(
   String s
);

Remarks

Uses escape codes for new lines, apostrophes, speech marks

See Also

TextUtils Class | Shunde.Utilities Namespace