add html fragment (and controls) to control tree

Discussion in 'ASP .Net Web Controls' started by Terry V, Aug 25, 2004.

  1. Terry V

    Terry V Guest

    Thanks for any help...

    I have a user control which includes among other controls an htmlholder.

    At runtime I pick up an html fragment from a web service (not mine) that
    looks like <form ... /form>. Within the fragment could be any controls but at
    the moment I am just working with an html input text and submit.

    I take the fragment (process it for some information) and then assign it to
    a literalcontrol that is added to the htmlholder.controls collection.

    The fragment is rendered just fine and any controls such as hyperlinks
    function properly when clicked.

    My problem is that when an htmlinput submit is clicked, causing a postback,
    I need to inspect the control tree to see the value of the htmlinput text,
    and then pass it back to the web service to be processed.

    I'm recreating the html fragment on postback during the Page_Init. But the
    controls are not in the control tree when I look for them after page_load, in
    the pre_render.

    I suspect that I should not use the literalcontrol for this process but am
    unsure of where to go. Even if I assign the html fragment to another control
    that might render it, how do I get the html converted into the controls and
    added to the control tree? Am I going to have to read the fragment, check for
    tags and add each control as I come across it? Is there something out there
    that will that would do this - like an htmltextreader? Or can someone suggest
    a good abstraction so I don't have to know what each control is to get it and
    it's properties into the control tree?

    This should be fun!
    --
    TIA,
    Terry
    Terry V, Aug 25, 2004
    #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. Stub

    B tree, B+ tree and B* tree

    Stub, Nov 12, 2003, in forum: C Programming
    Replies:
    3
    Views:
    10,087
  2. Andy Fish
    Replies:
    1
    Views:
    438
    Richard Tobin
    Feb 8, 2007
  3. Rajarshi
    Replies:
    1
    Views:
    526
    Gabriel Genellina
    Feb 11, 2007
  4. Chad Scharf
    Replies:
    3
    Views:
    851
    Chad Scharf
    Oct 18, 2007
  5. Jongware

    Tree fragment between two tags?

    Jongware, Jun 7, 2010, in forum: XML
    Replies:
    2
    Views:
    1,159
    Jongware
    Jun 7, 2010
Loading...

Share This Page