J
J
My application calls for a lookup table in which the user can add records.
When the application is run, an html table will be created dynamically to
show checkboxes (and .Text) for each of the values stored in the lookup
table. The checkboxes will be checked/unchecked depending on data in
another table.
The challenge is how to display the html table on first load AND displaying
the html table on postback while maintaining its view state. Here's my
battle plan:
1. Regardless of Postback: build the html table dynamically depending on
records in the lookup table.
2. if not PostBack: get a handle on the controls and set the
checked/unchecked values accordingly.
3. if is PostBack: nothing more. The viewstate should be maintained IF care
is taken regarding the order in which the dynamic controls are added and
their properties are set (ref:
http://scottonwriting.net/sowblog/posts/2152.aspx).
I'm reasonably comfortable that this will work. Regardless, the purist in
me is not comfortable rebuilding the dynamic html table in step #1 upon
postback. Ideas?
When the application is run, an html table will be created dynamically to
show checkboxes (and .Text) for each of the values stored in the lookup
table. The checkboxes will be checked/unchecked depending on data in
another table.
The challenge is how to display the html table on first load AND displaying
the html table on postback while maintaining its view state. Here's my
battle plan:
1. Regardless of Postback: build the html table dynamically depending on
records in the lookup table.
2. if not PostBack: get a handle on the controls and set the
checked/unchecked values accordingly.
3. if is PostBack: nothing more. The viewstate should be maintained IF care
is taken regarding the order in which the dynamic controls are added and
their properties are set (ref:
http://scottonwriting.net/sowblog/posts/2152.aspx).
I'm reasonably comfortable that this will work. Regardless, the purist in
me is not comfortable rebuilding the dynamic html table in step #1 upon
postback. Ideas?