Table Control
-
Hi all, Currently I have a Table object that's being populated on Page_Load(). ----------------------------------------------------------------------- protected System.Web.UI.WebControls.Table Table_Menu; private void Page_Load(object sender, System.EventArgs e) { populate_table(Table_Menu); } ------------------------------------------------------------------------- This table object contains controls like LinkButtons or other more Table objects (nested tables). But this results in 2 problems: Problem 1. States of the nested table properties (eg, visible, enable) cannot be maintained, since the table gets regenerated on each page load. Problem 2. Generating the table is expensive. So I really need a way that would allow me to generate the table only once or just less. If anyone cld help it'd be really appreciated. Thanks.
-
Hi all, Currently I have a Table object that's being populated on Page_Load(). ----------------------------------------------------------------------- protected System.Web.UI.WebControls.Table Table_Menu; private void Page_Load(object sender, System.EventArgs e) { populate_table(Table_Menu); } ------------------------------------------------------------------------- This table object contains controls like LinkButtons or other more Table objects (nested tables). But this results in 2 problems: Problem 1. States of the nested table properties (eg, visible, enable) cannot be maintained, since the table gets regenerated on each page load. Problem 2. Generating the table is expensive. So I really need a way that would allow me to generate the table only once or just less. If anyone cld help it'd be really appreciated. Thanks.
Anzy wrote: States of the nested table properties (eg, visible, enable) cannot be maintained, since the table gets regenerated on each page load. Not true. You need to pull the states out of viewstate in or before Page_Load, then restore them in PreRender. Anzy wrote: Generating the table is expensive. So I really need a way that would allow me to generate the table only once or just less. Where is the stuff coming from to populate the table ? What's in the table ? Christian I have drunk the cool-aid and found it wan and bitter. - Chris Maunder