LiteralControlBuilder.cs 795 B

123456789101112131415161718192021222324252627282930313233343536
  1. /**
  2. * Namespace: System.Web.UI.WebControls
  3. * Class: LiteralControlBuilder
  4. *
  5. * Author: Gaurav Vaish
  6. * Maintainer: [email protected]
  7. * Contact: <[email protected]>, <[email protected]>
  8. * Implementation: yes
  9. * Status: 100%
  10. *
  11. * (C) Gaurav Vaish (2001)
  12. */
  13. using System;
  14. using System.Web;
  15. using System.Web.UI;
  16. namespace System.Web.UI.WebControls
  17. {
  18. public class LiteralControlBuilder : ControlBuilder
  19. {
  20. public LiteralControlBuilder(): base()
  21. {
  22. }
  23. public override bool AllowWhitespaceLiterals()
  24. {
  25. return false;
  26. }
  27. public override void AppendSubBuilder(ControlBuilder subBuilder)
  28. {
  29. throw new HttpException(HttpRuntime.FormatResourceString("Control_does_not_allow_children",(typeof(Literal)).ToString()));
  30. }
  31. }
  32. }