G
Glenn Owens
I have an ASP.Net page on which there are serveral static controls
(listboxes, radiobuttonlist and textboxes). These controls are used to
create criteria from which the code-behind will dynamically create 1-n
datagrids.
When the Submit button is clicked I need to save (in viewstate) the
contents of the criteria controls so that I can recreate the dynamic
DataGrid(s) in the LoadViewState (overloaded method). I need to do
this so that the DataGrid controls are available for the page's
control heirarchy when the Changed events are serviced (i.e.
Datagrid:SelectedIndexchanged event).
All that being said... I know that I can save the criteria control
values to the ViewState via "brute force" (saving the values of each
control into an array, etc) and then reference the values when the
DataGrids are to be re-created in the LoadViewState. My question is -
is there a more elegant/efficient way of accessing the control values
prior to the Load_Page event?
I know that the listboxes, radiobuttonlist and textboxes are all
properly maintaining state (in their respective postback data
collections - via IPostbackDataHandler) but I don't know how to access
the data from the page prior to Page Load.
I look forward to your input on this, yet-another-headbanger, problem.
Glenn
(listboxes, radiobuttonlist and textboxes). These controls are used to
create criteria from which the code-behind will dynamically create 1-n
datagrids.
When the Submit button is clicked I need to save (in viewstate) the
contents of the criteria controls so that I can recreate the dynamic
DataGrid(s) in the LoadViewState (overloaded method). I need to do
this so that the DataGrid controls are available for the page's
control heirarchy when the Changed events are serviced (i.e.
Datagrid:SelectedIndexchanged event).
All that being said... I know that I can save the criteria control
values to the ViewState via "brute force" (saving the values of each
control into an array, etc) and then reference the values when the
DataGrids are to be re-created in the LoadViewState. My question is -
is there a more elegant/efficient way of accessing the control values
prior to the Load_Page event?
I know that the listboxes, radiobuttonlist and textboxes are all
properly maintaining state (in their respective postback data
collections - via IPostbackDataHandler) but I don't know how to access
the data from the page prior to Page Load.
I look forward to your input on this, yet-another-headbanger, problem.
Glenn