S
samtilden
Team:
I have made a System.Web.UI.WebControls.Table called Table1. I can add
a few rows in the VS2005 Designer and those rows do indeed persist
between web page views. I can even do a Table1.Rows.Clear() and these
rows go away, as expected.
The problem is that when I add rows dynamically within my aspx.cs
source code (via Table1.Rows.Add(row), the added rows appear once and
only once. When I refresh the page, the rows I added dynamically are
gone from the web page.
I turned on EnableViewState=true for Table1, for every Row within
Table1, for every Cell within every Row, and for every Control within
every Cell. The dynamically added rows do not appear the second time,
after a refresh.
I have other web controls that work fine, e.g., CheckBoxList, that
persist their dynamically added data (in this case via Items.Add()).
What am I doing wrong?
Thanks.
I have made a System.Web.UI.WebControls.Table called Table1. I can add
a few rows in the VS2005 Designer and those rows do indeed persist
between web page views. I can even do a Table1.Rows.Clear() and these
rows go away, as expected.
The problem is that when I add rows dynamically within my aspx.cs
source code (via Table1.Rows.Add(row), the added rows appear once and
only once. When I refresh the page, the rows I added dynamically are
gone from the web page.
I turned on EnableViewState=true for Table1, for every Row within
Table1, for every Cell within every Row, and for every Control within
every Cell. The dynamically added rows do not appear the second time,
after a refresh.
I have other web controls that work fine, e.g., CheckBoxList, that
persist their dynamically added data (in this case via Items.Add()).
What am I doing wrong?
Thanks.