Notes for dishes
About ASP. NET about Chinese parameters passed by foreground scripts, garbled characters are obtained in the background (garbled box, black box, etc ..) There are actually many solutions to this garbled problem.
Generally, you only need to add escape or encodeuri to the script parameter, and the Chinese characters can be obtained without any operation in the background.
In fact, many jquery frameworks are used in scripts. When using framework controls, parameters passed are easily garbled. Sometimes you use a window. Open ("............ ") It is normal to pass the parameter. For example, if you use
$. Ligerdialog. Open ({Height: 600, URL: XXX. aspx? Type = '+ "", width: 1000}); after the special transfer method of this pop-up box control, the Chinese parameters obtained in the background are often garbled,
But sometimes we don't want to modify the foreground script. This can be added in Web. config.CodeThis operation is intended for a page.
<Location Path = "XXX. aspx">
<System. Web>
<Globalization requestencoding = "gb2312" responseencoding = "gb2312"/>
</System. Web>
</Location>
If all pages are required, add <globalization requestencoding = "gb2312" responseencoding = "gb2312"/> to the <system. Web> node.