namespace Learun.Application.Web.Extensions { public class StrHelper { public static string DelErrChar(string str) { str = str.Trim().ToLower(); if (string.IsNullOrEmpty(str)) return string.Empty; string[] ErrStr = new string[] { "select", "update", "insert", "delete", "'", ";", ":", "@", "or", "and", "drop", "alter", "create", "exec" }; for (int i = 0; i < ErrStr.Length; i++) { if (str.Contains(ErrStr[i])) { str = str.Replace(ErrStr[i], string.Empty); } } return str; } } }