asp:Table & ViewState

N

Neven Klofutar

Hi,

I have a problem, and it seems I have an error in my logic ...

First I add a Table control on my webform (EnableViewState is True by
default).
Then I retrive some information vie QueryString (in the !isPostBack part of
the Page_Load event) and use those information (in code behind, in
!isPostBack part of Page_LOad event) to add some rows and cells to Table I
added moment ago.
Whenever a PostBack occurs the Table get 'reseted', and I don't see the data
anymore ...

Why is this happening since Table is part of webform (not beening created
dinamicaly) and EnabledViewState is set to True ?

thanx, Neven
 
K

Karl Seguin

Rows and cells need to be re-added on postback - this information isn't
stored in the viewstate.

Karl
 

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

Top