接收到的URL是乱码怎么办?
跳转页面:代码
case TargetTypes.Logon:
url = string.Format(url, TargetType, m_FromSystem, Login_ID, Logon_Region, expiredDateTime);// "http://hi2-keven-zhang.bqc.corp.com/flower/flowerRoute.aspx?Target_Type=LOGON&From_System=eHR&Logon_Region=zh-TW "; //
url = BenQGuru.eHR.Common.CommonAESEncrypt.AESEncrypt(url);
url = HttpUtility.UrlEncode(url);
url = flowerWebUrl + "/flowerRoute.aspx?Para= " + url;
break;
接收页面 :
if (BenQGuru.eHR.PresentationLayer.Conformity.LinkVerify.IsSSOLogin)
{
SSOLogin();
}
else
{
if (Request.QueryString[ "para "] != null && Request.QueryString[ "para "].ToString() != string.Empty && BenQGuru.eHR.PresentationLayer.Conformity.LinkVerify.AllowEncryptUrlLogin)
{
LoginByUrl();
}
else if (BenQGuru.eHR.PresentationLayer.Conformity.LinkVerify.AllowCookieLogin)
{
Login();
}
}
是null 原因:接收的URL是乱码
url=http%3a%2f%2fdh32-lam-yang.bqc.corp.com%2fEHR456%2feHRMainFrameForPortal.aspx%3fPara%3dQunKVNhsSzugUOBvYxKnh1xGVR5OCElKoTL6fvPbFzcmCV03OUDq6KZstOvGxMBSjwBpjEuDBU6fFfT3zLBlgR%252btnjaCekI2OBFAdICzySiv6qlE9w7VRekqyAaqBHVg8UewD2cXIjX1RnW2qrCbnxB2Wq7rJGwXMUkdsnI3PXU%253d
我应该在接收页面怎么处理??
------解决方案--------------------接受页面解码一下 就不会是乱码了 Server.UrlDecode()
------解决方案--------------------uRL += "&KW=" +HttpUtility.UrlEncode(this.TB_SubSearchKey.Text.Trim(),System.Text.Encoding.UTF8);//编码,请注意编码格式必须和你的整个站的编码一样
if (Request.QueryString["KW"] != null) this.TB_KeyWord.Text =Request.QueryString["KW"].ToString();//解码时不用操作
------解