LiteralControl.cs 980 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. //
  2. // System.Web.UI.LiteralControl.cs
  3. //
  4. // Author:
  5. // Bob Smith <[email protected]>
  6. //
  7. // (C) Bob Smith
  8. //
  9. using System;
  10. using System.Web;
  11. namespace System.Web.UI
  12. {
  13. public class LiteralControl : Control
  14. {
  15. private string _text = String.Empty;
  16. public LiteralControl() {}
  17. public LiteralControl(string text)
  18. {
  19. _text = text;
  20. }
  21. public virtual string Text
  22. {
  23. get
  24. {
  25. return _text;
  26. }
  27. set
  28. {
  29. _text = value;
  30. }
  31. }
  32. protected override void Render(HtmlTextWriter writer)
  33. {
  34. writer.Write(_text);
  35. }
  36. }
  37. }