TemplateBuilder.cs 942 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //
  2. // System.Web.UI.TemplateBuilder
  3. //
  4. // Authors:
  5. // Gonzalo Paniagua Javier ([email protected])
  6. //
  7. // (C) 2003 Ximian, Inc. (http://www.ximian.com)
  8. //
  9. using System;
  10. using System.Collections;
  11. namespace System.Web.UI
  12. {
  13. public class TemplateBuilder : ControlBuilder, ITemplate
  14. {
  15. string text;
  16. public TemplateBuilder ()
  17. {
  18. }
  19. public virtual string Text {
  20. get { return text; }
  21. set { text = value; }
  22. }
  23. public override void Init (TemplateParser parser,
  24. ControlBuilder parentBuilder,
  25. Type type,
  26. string tagName,
  27. string ID,
  28. IDictionary attribs)
  29. {
  30. // enough?
  31. base.Init (parser, parentBuilder, type, tagName, ID, attribs);
  32. }
  33. public virtual void InstantiateIn (Control container)
  34. {
  35. CreateChildren (container);
  36. }
  37. public override bool NeedsTagInnerText ()
  38. {
  39. return false;
  40. }
  41. public override void SetTagInnerText (string text)
  42. {
  43. this.text = text;
  44. }
  45. }
  46. }