You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
691 B
C#

namespace EntrustSettle.Common.Helper
{
public class UrlHelper
{
/// <summary>
/// UrlEncode编码
/// </summary>
/// <param name="url">url</param>
/// <returns></returns>
public static string UrlEncode(string url) {
return System.Web.HttpUtility.UrlEncode(url, System.Text.Encoding.UTF8);
}
/// <summary>
/// UrlEncode解码
/// </summary>
/// <param name="data">数据</param>
/// <returns></returns>
public static string UrlDecode(string data)
{
return System.Web.HttpUtility.UrlDecode(data, System.Text.Encoding.UTF8);
}
}
}