传递时编码:
string
keyword
=
this
.txtSeek.Text.Trim();
this .Response.Redirect( " ~/product/product_list.aspx?keyword= " + Server.UrlEncode(keyword));
this .Response.Redirect( " ~/product/product_list.aspx?keyword= " + Server.UrlEncode(keyword));
如果此时传递的是中文"我",则地址栏显示
...product
/
product_list.aspx
?
keyword
=%
e6
%
88
%
91
接收时解码:
string
keyword
=
Server.UrlDecode(Request.QueryString[
"
KeyWord
"
]);