public static string GetQueryStringParamDecrypted(string strQueryString, string strKey) { if (strQueryString.IndexOf("?qs=") > -1) { string strQueryStringCrypted = strQueryString.Remove(0, 4); string strQueryStringDecrypted = String.Empty; string strResultMessage = String.Empty; var objISCrypto = new ISCrypto(); if (objISCrypto.decrypt(strQueryStringCrypted.Replace(" ", "+"), ref strQueryStringDecrypted, ref strResultMessage)) { strQueryStringDecrypted = strQueryStringDecrypted.ToLower(); strKey = strKey.ToLower(); string[] strKeys = strQueryStringDecrypted.Split('&'); foreach (string strTemp in strKeys) { if ((strTemp.IndexOf(strKey) > -1)) { return(strTemp.Replace((strKey + "="), "").Trim()); } } } } return(String.Empty); }
public static string GetQueryStringParamDecrypted(HttpRequest _request, string strKey) { if (_request.QueryString.Get("qs") != null) { string strQueryStringCrypted = _request.QueryString.Get("qs"); string strQueryStringDecrypted = String.Empty; string strResultMessage = String.Empty; var objISCrypto = new ISCrypto(); if (objISCrypto.decrypt(strQueryStringCrypted.Replace(" ", "+"), ref strQueryStringDecrypted, ref strResultMessage)) { strQueryStringDecrypted = strQueryStringDecrypted.ToLower(); strKey = strKey.ToLower(); string[] strKeys = strQueryStringDecrypted.Split('&'); foreach (string strTemp in strKeys) { if ((strTemp.IndexOf(strKey) > -1)) { return(strTemp.Replace((strKey + "="), "").Trim()); } } } } return(String.Empty); }