Пример #1
0
        /// <summary>
        /// 获取验证码路径
        /// </summary>
        /// <returns></returns>
        public static string GetVcodeUrl(string prehttpurl)
        {
            GenerateVcode();

            return(prehttpurl + "ValidateCode.ashx?code=" +
                   HttpUtility.UrlEncode(DataProtection.Encrypt(HttpContext.Current.Session[QueryStringCons.ValidateCode].ToString(),
                                                                DataProtection.Store.User)));
        }
Пример #2
0
        public static string GetImageUrl(string code)
        {
            string codeEncrypt = HttpUtility.UrlEncode(DataProtection.Encrypt(code, DataProtection.Store.User));
            string ValidateURL = (System.Configuration.ConfigurationManager.AppSettings["ValidateURL"] == null ?
                                  string.Empty : System.Configuration.ConfigurationManager.AppSettings["ValidateURL"].ToString());

            return(string.Format(ValidateURL, codeEncrypt));
        }