I have a web form which allows a user to search on data.
The returned data is grouped by a 'groupfield' (say for example) - and for each change of 'groupfield' a new WebUserControl is added to a panel on the main web form (having been cleared initially).
Within the WebUserControl I show the appropriate data records for that 'groupfield' and allow the user to update these via textboxes, etc (so an underlying data record could have it's 'field1' / 'field2' values changed) - this is done via SQL and hits the underlying database table.
Following these being updated I want to reload the control and show the newly updated data.
However, given these controls were initially added dynamically to the main web form, as soon as I click a button in one of them (WebUserControls) the main page effectively reloads and the added WebUserControls no longer exist. So the update / reload from the button (in the WebUserControl) being clicked do not get run.
How can I get around this?
I want to allow the user to make entries in the WebUserControl(s) and then click a button in the same WebUserControl(s) for the data to be updated and the contents of the control to be reloaded / refreshed.
How do I do this?
Any help would be appreciated.
I've been tearing my hair out all day...
Thanks in advance.
Steve
The returned data is grouped by a 'groupfield' (say for example) - and for each change of 'groupfield' a new WebUserControl is added to a panel on the main web form (having been cleared initially).
Within the WebUserControl I show the appropriate data records for that 'groupfield' and allow the user to update these via textboxes, etc (so an underlying data record could have it's 'field1' / 'field2' values changed) - this is done via SQL and hits the underlying database table.
Following these being updated I want to reload the control and show the newly updated data.
However, given these controls were initially added dynamically to the main web form, as soon as I click a button in one of them (WebUserControls) the main page effectively reloads and the added WebUserControls no longer exist. So the update / reload from the button (in the WebUserControl) being clicked do not get run.
How can I get around this?
I want to allow the user to make entries in the WebUserControl(s) and then click a button in the same WebUserControl(s) for the data to be updated and the contents of the control to be reloaded / refreshed.
How do I do this?
Any help would be appreciated.
I've been tearing my hair out all day...
Thanks in advance.
Steve