ViewState not working for runtime web controls on postback

Discussion in 'ASP .Net' started by =?Utf-8?B?TWVyZGFhZA==?=, Oct 29, 2006.

  1. Hi,
    I am using ASP.NET 2.0 with C#.
    On a page I have a few (static) textboxes that get populated from database
    and then I create other textboxes during runtime using the folloiwng steps:
    1. I add a TableRow(TR) to an existing table using HtmlTableRow
    2. I add TableCells(TD) to the above TR using HtmlTableCell
    3. I add TextBoxes to the TDs using using TextBox

    Then I start entering into the runtime Textboxes, when done, I press Enter
    which does a postback. Now I am back at the page and my first list of static
    textboxes are still there while the runtime textboxes and the TR and TDs are
    gone. If I try to recreate the TRs with the same name as before, I get an
    invalid ID meaning that the TR is still on the form. I just don't see it.

    How would I presere the runtime web controls upon postback? How would I see
    them?

    Thanks
     
    =?Utf-8?B?TWVyZGFhZA==?=, Oct 29, 2006
    #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. shail
    Replies:
    0
    Views:
    392
    shail
    Aug 30, 2003
  2. Chuck Ritzke
    Replies:
    4
    Views:
    3,715
    Chuck Ritzke
    Aug 6, 2004
  3. Priyanka AGARWAL
    Replies:
    9
    Views:
    10,041
    Gordon Beaton
    May 25, 2004
  4. mark

    Viewstate errors... how do I get viewstate working?

    mark, Feb 20, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    294
  5. Earl Teigrob

    ViewState of Child Controls Not Working Mystery???

    Earl Teigrob, Oct 7, 2004, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    287
Loading...

Share This Page