url编码

来源:互联网 发布:we piano软件 编辑:程序博客网 时间:2024/05/16 04:35
方案一
: 
  Security sec = new Security();
  传递
  http:localhost/book.aspx?key="+sec.Encrypt(key, "cccccccc")+"
  获取
  string key= sec.Decrypt(Request.QueryString["key"].ToString(), "cccccccc");
方案二

传递
  http:localhost/book.aspx?key="+Server.UrlEncode(key)+"
 获取
  string key= Server.UrlDecode(Request.QueryString["key"].ToString());
原创粉丝点击