传递中文之前,将要传递的中文参数进行编码,在接收时再进行解码。
传递时编码:
string keyword=this.txtSeek.Text.Trim();
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"]);

相关文章:

  • 2021-07-05
  • 2021-08-03
  • 2021-10-15
  • 2022-01-14
  • 2022-12-23
  • 2021-11-21
  • 2022-12-23
猜你喜欢
  • 2021-07-16
  • 2021-12-09
相关资源
相似解决方案