Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

loosing the viewstate of my table control

Status
Not open for further replies.

VBGuy2112

Programmer
Feb 19, 2002
58
US
I have a table (System.Web.UI.WebControls.Table) on my page and I'm creating the rows and cells dynamically based off of information from the database. I have the EnableViewState set to true for the table control but I am loosing the viewstate when the page is submitted to itself. I also tried setting the EnableViewState to true for the rows and cells that I added during the code behind, but that did not help.

Is there anyway to preserve the viewState? Has anyone run into this before? I would think that this is a very common thing to be doing in code. I'm also adding DropDownLists and checkboxes to my columns.

If this way just won't work, is there something else I could try?

Thanks!!
 
when you bind the table the first time do you have it in

if not page.ispostback then
bind table
end if

?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top