For .net 4.0 + there is standard
HttpUtility.JavaScriptStringEncode
For earlier west wind solution described by Lone Coder is quite nice
For .net 4.0 + there is standard
HttpUtility.JavaScriptStringEncode
For earlier west wind solution described by Lone Coder is quite nice