ViewState not working for runtime web controls on postback

G

Guest

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top