dropdownlist viewstate inside a dynamic table

R

russ

Hi all,

I've got an web form with two things on it:
* <table runat=server>
* <asp:DropDownList> inside one of the <td> of the table.

I only populate the dropdown inside a "if (!IsPostBack)". Everytime I
postback I'm inserting a column into the table, the dropdown always
remains in the last column. First time I postback the dropdown is
populated okay. The second time its empty.

I'm guessing there's something funny going on with the viewstate
population matching up with the control heirarchy. If I move the
dropdown out of the table everything is okay.

Any one run into this before? Please let me know what I'm doing wrong?
Any pointers to the inner workings of viewstate, and best practises
for dynamic controls would be greatly appreciated!

- Russ
 

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

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top