5.url Solution for delivering Chinese
1. Set the Web.config file.
<system.web>
......
<globalization requestEncoding="gb2312" responseEncoding="gb2312" culture="zh-CN" fileEncoding="gb2312" />
......
</system.web>
2. Before passing the Chinese language, the Chinese parameters to be passed are encoded and decoded at the time of receiving.
>> to deliver
String Name = "Chinese parameters";
Response.Redirect ("B.aspx?") Name= "+server.urlencode (Name));
>> to receive
String Name = request.querystring["name"];
Response.Write (Server.urldecode (Name));
3. If it's from. HTML file to. Aspx file to pass the Chinese parameter (that is, do not use the Redirect () method for URL conversion from the background). To encode the passed Chinese parameters and decode them when they are received.
>> to deliver
<script language="JavaScript">
function GoUrl()
{
var Name = "中文参数";
location.href = "B.aspx?Name="+escape(Name);
}
</script>
<body onclick="GoUrl()">>> 进行接收
string Name = Request.QueryString["Name"];
Response.Write(Server.UrlDecode(Name));
Generally speaking. You can set the Web.config file. But if you use JavaScript to invoke the WebService method (pass the Chinese parameter to the WebService). Setting the Web.config file appears to be invalid.