首页 > 代码库 > httpHelper 从URL获取值

httpHelper 从URL获取值

/// <summary>
        /// 从URL获取值(字符串)
        /// </summary>
        public static string GetValueFromUrl(string key)
        {
            string keyvalue = http://www.mamicode.com/HttpContext.Current.Request.QueryString[key];"";
        }
        /// <summary>
        /// 从URL获取值(整型)
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        public static int GetIntValueFromUrl(string key)
        {
            string keyvalue = http://www.mamicode.com/HttpContext.Current.Request.QueryString[key];"str"></param>
        /// <returns></returns>
        public static string KillBadString(string str)
        {
            if (str == null || str.Length == 0)
            {
                return "";
            }
            str = System.Text.RegularExpressions.Regex.Replace(str, "‘", "‘‘");
            return str;
        }

  

httpHelper 从URL获取值