. Net uses the escape and unescape methods:
In C #, use escape and unescape to add reference: Microsoft. JScript
String strEscaped = Microsoft. JScript. GlobalObject. escape ("test ");
Note: Some js functions are all stored under GlobalObject in jscript.net.
Similarly, you can use functions such as unescape, encodeURI, and decodeURI.
Or Server. UrlDecode (Cells );
For most URL parameters. For decryption.
JS url encryption and decryption: encoding (escape, encodeURI, encodeURIComponent), decoding (unescape, decodeURI, decodeURIComponent)
1. encodeURIComponent is required when passing parameters so that the combined url will not be truncated by special characters such.
2. encodeURI can be used for url redirection.
3. You can use escape when js uses data.
4. When encoding unicode values other than 0-, escape outputs % u *** format. In other cases, escape, encodeURI, and encodeURIComponent have the same encoding result.