给一个文本 和 编码类型 转换成 规定类型的 URL 编码
public static string GetUrlEncode(string s, System.Text.Encoding e)
{
if (s.Trim() != "")
{
return HttpUtility.UrlEncode(s, e); // 这个带自定义 字符编码的 转换
//HttpUtility.UrlDecode(s); // 这个是另一种 重载 不带 字符编码 的 转换 是 默认用当前线程使用的字符编码
}
else
{
return "";
}
public static string GetUrlEncode(string s, System.Text.Encoding e)
{
if (s.Trim() != "")
{
return HttpUtility.UrlEncode(s, e); // 这个带自定义 字符编码的 转换
//HttpUtility.UrlDecode(s); // 这个是另一种 重载 不带 字符编码 的 转换 是 默认用当前线程使用的字符编码
}
else
{
return "";
}
浙公网安备 33010602011771号