Esempio 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()))));
 }
Esempio 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()))));
 }