Solution for url passing Chinese
1. Set up the web.config file. (I don't like it set up like this)
<system.web>
...
<globalization requestEncoding="gb2312" responseEncoding="gb2312" culture="zh-CN" fileEncoding="gb2312" />
...
</system.web>
2. Before transmitting Chinese, encode the Chinese parameters to be transmitted, and then decode them when receiving.
>> Make a transfer
string Name = "Chinese Parameter";
Response.Redirect("B.aspx?Name="+Server.UrlEncode(Name));
>> to receive
string Name = Request.QueryString["Name"];
Response.Write(Server.UrlDecode(Name));
3. If the Chinese parameters are passed from the .HTML file to the .Aspx file (that is, the Redirect() method is not used from the background to perform Url conversion). The Chinese parameters passed must also be encoded and then decoded when receiving.
>> Make a transfer
<script language="JavaScript">
function GoUrl()
{
var Name = "Chinese Parameter";
location.href = "B.aspx?Name="+escape(Name);
}
</script>
<body onclick="GoUrl()">
>> to receive
string Name = Request.QueryString["Name"];
Response.Write(Server.UrlDecode(Name));
Generally speaking. Just set up the web.config file. But if you use JavaScript to call the webservice method (pass Chinese parameters into the webservice). Setting the web.config file seems to be invalid.
-------------------------------------------------- -------------
My personal opinion, please give me more pointers.