string direct = "../Search/Quick_CompanyListPro.aspx?Keyword="+Server.UrlEncode(TextBox_Name.Text.Trim());//对查询字符串进行加密
Response.Redirect(direct);
//对查询字符串进行解密.
//Request对象获得地址栏中加密的查询字符串
string strKeyword=Server.UrlDecode(Request["Keyword"]);
本文介绍了一种通过Server.UrlEncode和Server.UrlDecode方法实现查询字符串加密与解密的技术。具体地,使用Server.UrlEncode方法对查询字符串进行编码,以便将其安全地嵌入到URL中;而在接收端,则采用Server.UrlDecode方法来还原原始查询字符串。
6779

被折叠的 条评论
为什么被折叠?



