how to parse deeper nested tags in custom control

Discussion in 'ASP .Net' started by =?Utf-8?B?U0VC?=, Nov 25, 2005.

  1. can any one please redirect me to how to use control builder class to parse
    the following case (or any other method)
    <mycustomcontroltag>
    <item attribute1="x" attribute2="y" ......>
    <subitems>
    <item attribute1="xx" attribute2="yy" ......>
    <subitems>
    more deeper nested tags can be here
    </subitems>
    </item>
    </subitems>
    </item>
    more item tags with deeper nested sub tags can be here
    </ycustomcontroltag>
     
    =?Utf-8?B?U0VC?=, Nov 25, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?U0VC?=

    Brock Allen Guest

    I'd suggest looking into the various attributes that control the paraser
    such as ParseChildren and PersistenceMode. With those 2 I think you can get
    the nesting you're looking for there. Also, I'd suggest checking out "Developing
    Microsoft ASP.NET Server Controls and Components", Nikhil Kothari, Vandana
    Datye:

    http://www.amazon.com/gp/product/07...0?v=glance&n=283155&n=507846&s=books&v=glance

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen

    > can any one please redirect me to how to use control builder class to
    > parse
    > the following case (or any other method)
    > <mycustomcontroltag>
    > <item attribute1="x" attribute2="y" ......>
    > <subitems>
    > <item attribute1="xx" attribute2="yy" ......>
    > <subitems>
    > more deeper nested tags can be here
    > </subitems>
    > </item>
    > </subitems>
    > </item>
    > more item tags with deeper nested sub tags can be here
    > </ycustomcontroltag
     
    Brock Allen, Nov 26, 2005
    #2
    1. Advertising

  3. Brock,
    You are totalement right.
    I just added [ParseChildren(true)] [PersistChildren(false)] to both classes
    and
    [PersistenceMode(PersistenceMode.InnerProperty)] to the properties and it
    worked

    Thanks a lot.

    by the way i could not registered in your blog, is it possible or not?

    "Brock Allen" wrote:

    > I'd suggest looking into the various attributes that control the paraser
    > such as ParseChildren and PersistenceMode. With those 2 I think you can get
    > the nesting you're looking for there. Also, I'd suggest checking out "Developing
    > Microsoft ASP.NET Server Controls and Components", Nikhil Kothari, Vandana
    > Datye:
    >
    > http://www.amazon.com/gp/product/07...0?v=glance&n=283155&n=507846&s=books&v=glance
    >
    > -Brock
    > DevelopMentor
    > http://staff.develop.com/ballen
    >
    > > can any one please redirect me to how to use control builder class to
    > > parse
    > > the following case (or any other method)
    > > <mycustomcontroltag>
    > > <item attribute1="x" attribute2="y" ......>
    > > <subitems>
    > > <item attribute1="xx" attribute2="yy" ......>
    > > <subitems>
    > > more deeper nested tags can be here
    > > </subitems>
    > > </item>
    > > </subitems>
    > > </item>
    > > more item tags with deeper nested sub tags can be here
    > > </ycustomcontroltag>

    >
    >
    >
     
    =?Utf-8?B?U0VC?=, Nov 26, 2005
    #3
    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. Dean H. Saxe
    Replies:
    0
    Views:
    1,039
    Dean H. Saxe
    Jan 3, 2004
  2. Ranganath

    Custom Tags within Custom Tags.

    Ranganath, Oct 17, 2003, in forum: Java
    Replies:
    2
    Views:
    462
    Ranganath
    Oct 21, 2003
  3. Dave
    Replies:
    0
    Views:
    451
  4. Durgesh Sharma
    Replies:
    5
    Views:
    897
    E. Robert Tisdale
    Dec 21, 2004
  5. Stephen Miller
    Replies:
    12
    Views:
    773
    Stephen Miller
    Jan 20, 2004
Loading...

Share This Page