HttpUtility.JavaScriptStringEncode()
which can be used to encode string values for JavaScript. It is a handy method which will take care of all special characters in the string including new line characters. http://msdn.microsoft.com/en-us/library/dd991914.aspxhttp://itmeze.com/2011/03/21/javascript-encode-on-server-side-medium-trust-environment/
No comments:
Post a Comment