DPage.cs 900 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Web.UI.WebControls;
  6. public static class DPage
  7. {
  8. #region 提取控件值
  9. ///// <summary>
  10. ///// 读取表单控件值
  11. ///// </summary>
  12. ///// <param name="control">控件</param>
  13. //public static string GetValue(this TextBox control)
  14. //{
  15. // if (control.IsNull())
  16. // {
  17. // return String.Empty;
  18. // }
  19. // return control.Text.Trim().FilterHTML();
  20. //}
  21. #endregion
  22. #region 设置控件值
  23. ///// <summary>
  24. ///// 设置表单控件值
  25. ///// </summary>
  26. ///// <param name="control">控件</param>
  27. //public static void SetValue(this TextBox control, string val)
  28. //{
  29. // if (control.IsNull())
  30. // {
  31. // return;
  32. // }
  33. // control.Text = val.Trim();
  34. //}
  35. #endregion
  36. }