摘要:
using System;using System.Collections.Generic;using System.Linq;using System.Data;using System.Configuration;using System.Web;using Microsoft.VisualBasic;using System.Security.Cryptography;using System.Security;using System.Text.RegularExpressions;using System.Text;using System.IO;namespace DataHelp 阅读全文
摘要:
/// <summary> /// 去除超链接标记 /// </summary> /// <param name="str"></param> /// <returns></returns> public static string DelLink(string str) { if (str != null && str.Trim() != "") return Regex.Replace(str, "(<a[^>]+>)|(</a 阅读全文
摘要:
/// <summary> /// 截取字符串并去掉图片 /// </summary> /// <param name="content">要处理的字符串</param> /// <param name="length">截取长度</param> /// <param name="tail">尾部特定字符</param> /// <returns></returns> public static string Cut 阅读全文
摘要:
/// <summary> /// 该方法检测并替换用户输入的恶意字符 /// </summary> /// <param name="text">用户输入的文字 </param> /// <returns>返回验证后的文字 </returns> public static string InputText(string text) { text = text.ToLower().Trim(); if (string.IsNullOrEmpty(text)) { return string.Empty; 阅读全文
摘要:
/// <summary> /// 该方法用于生成指定位数的随机字符串 /// </summary> /// <param name="VcodeNum">参数是随机数的位数</param> /// <returns>返回一个随机数字符串</returns> public static string RndNumStr(int VcodeNum) { string[] source = { "0", "1", "1", "3" 阅读全文
摘要:
/// <summary> /// 检测是否不带恶意字符 /// </summary> /// <param name="InText"></param> /// <returns>如果参数存在不安全字符,则返回true</returns> public static bool SqlFilter(string InText) { string word = "and|exec|insert|select|delete|update|master|or|truncate|declare|.&q 阅读全文