Query Word Fu string is appended to the URL after the data (also I often used)
For example:
Http://www.cnblogs.com/aierong/admin/EditPosts.aspx?opt=abc
Over here? After the opt=1 is the query string
This method can be used when we pass data to another page on one page.
You receive data by using the following methods:
String str=request.querystring["opt"]
So str equals "ABC."
Here we are passing the English characters, if we pass Chinese characters, we have to encode and reconcile it:
When sending, use the Server.URLEncode method to encode, receive time to use Server.urldecode to solve the password.
For example:
Passed:
String Url= "http://www.cnblogs.com/aierong/admin/EditPosts.aspx?opt=" +server.urlencode ("we");
Response.Redirect (URL);
Receive:
String Str=server.urldecode (request.querystring["opt"]);
So str equals "we."
Of course, we still have a convenient way:
Modify the globalization section in Web.config to
<globalization
requestencoding= "gb2312"
responseencoding= "gb2312"
/>