Inner content persistance

Discussion in 'ASP .Net Building Controls' started by Mark, Aug 17, 2007.

  1. Mark

    Mark Guest

    In my custom control I am parsing sub properties between my controls tags.
    The elements in between the tags should form a collection property but will
    also contain controls themselves. In this scenario I am slightly confused as
    it appears you should use ParseChildren(true, "<defaultproperty>") when the
    inner content is to be parsed as properties or PersistChildren(true) when the
    inner content is to be parsed as controls. What if you want both conditions?

    One way I have implemented this is to parse the inner contents using
    ParseChildren(true) and then to override CreateChildControls method and add
    the inner controls through the property collection to the control tree. When
    using ParseChildren(true) the method AddParseSubObject does not fire and
    therefore how should I inspect the contents between my tags when they are
    parsed so that I can test declarative attributes and raise exceptions if
    required. Should I be looking to override the ControlBuilder class?

    Any help would be much appreciated.
    Mark, Aug 17, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Atif Jalal

    collection of Objects persistance

    Atif Jalal, Aug 13, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    353
    Atif Jalal
    Aug 13, 2003
  2. Free
    Replies:
    2
    Views:
    1,089
    Brian
    Oct 20, 2003
  3. Lucas, Todd
    Replies:
    0
    Views:
    683
    Lucas, Todd
    May 8, 2004
  4. Carlo v. Dango
    Replies:
    14
    Views:
    1,010
    Alex Martelli
    Oct 19, 2003
  5. Pyenos
    Replies:
    2
    Views:
    376
    Pyenos
    Dec 27, 2006
Loading...

Share This Page