给一个文本 和 编码类型 转换成 规定类型的 URL 编码
        public static string GetUrlEncode(string s, System.Text.Encoding e)
        {
            if (s.Trim() != "")
            {
                return HttpUtility.UrlEncode(s, e);  //  这个带自定义 字符编码的 转换
                //HttpUtility.UrlDecode(s);     // 这个是另一种 重载 不带 字符编码 的 转换 是 默认用当前线程使用的字符编码
            }
            else
            {
                return "";
            }
posted on 2008-03-16 23:52  阿春  阅读(245)  评论(0)    收藏  举报