摘要:
/// /// 格式化文本(防止SQL注入) /// /// /// public static string Formatstr(string html) { Regex regex1 = new Regex(@"标记 html = rege... 阅读全文
摘要:
/// /// 对Url进行编码 /// /// url /// 编码字符是否转成大写,范例,"http://"转成"http%3A%2F%2F" public static string UrlEncode(string url, bool isUpper = false) { ... 阅读全文
摘要:
/// /// 对html字符串进行编码 /// /// html字符串 public static string HtmlEncode(string html) { return HttpUtility.HtmlEncode(html); } //... 阅读全文
摘要:
/// /// 解析相对Url /// /// 相对Url public static string ResolveUrl(string relativeUrl) { if (string.IsNullOrWhiteSpace(relativeUrl)) ... 阅读全文
摘要:
/// /// 获取本机IP /// /// public static string GetLocalIP() { try { string HostName = Dns.GetHostName(); //得到主机名 ... 阅读全文
摘要:
/// /// 是否为ip /// /// /// public static bool IsIP(string ip) { return Regex.IsMatch(ip, @"^((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]... 阅读全文
摘要:
using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Reflection; using System.Text; using System.Threading.Tasks; namespace EasyFrame.Common... 阅读全文
摘要:
using System; using System.Collections.Generic; using System.Text; using System.Configuration; using System.IO; using System.Web; using System.Net.Mail; using System.Net; using System.ComponentModel;... 阅读全文
摘要:
using System; using System.Collections.Generic; using System.Linq; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.Reflection; using System.Data; using Newtonsoft.Json.Linq; na... 阅读全文
摘要:
using NPOI.SS.UserModel; using NPOI.XSSF.UserModel; using System; using System.Collections.Generic; using System.Data; using System.IO; using System.Linq; using Newtonsoft.Json; namespace EasyFrame.C... 阅读全文
摘要:
/// /// UTF-16转UTF-8 /// /// /// public static string UTF16To8(string str) { string res; int i, len, c; res =... 阅读全文
摘要:
private static string base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; private static int[] base64DecodeChars ={ -1, -1, -1, -1, -1, -1, ... 阅读全文