Exemplo n.º 1
0
 public static string GetTextAndFilter(ITextControl textCtrl)
 {
     if (textCtrl == null)
     {
         throw new ArgumentNullException("获取文本内容的控件不能为空!");
     }
     if (string.IsNullOrEmpty(textCtrl.Text))
     {
         return("");
     }
     return(Utility.HtmlEncode(TextFilter.FilterSql(TextFilter.FilterScript(textCtrl.Text.Trim()))));
 }
Exemplo n.º 2
0
 public static string GetTextAndFilter(HiddenField hiddenCtrl)
 {
     if (hiddenCtrl == null)
     {
         throw new ArgumentNullException("获取文本内容的控件不能为空!");
     }
     if (string.IsNullOrEmpty(hiddenCtrl.Value))
     {
         return("");
     }
     return(Utility.HtmlEncode(TextFilter.FilterSql(TextFilter.FilterScript(hiddenCtrl.Value.Trim()))));
 }