I am dynamically creating 2 dropdown boxes and a CheckBoxList control using AJAX callbacks to a web service (.asmx file). The server-side service generates the Dropdowns and CheckBoxList, returning the rendered html as a string which is then inserted into the web page at runtime via javascript functions.
During postback, my goal is to retrieve the selected values of the two dropdown boxes and determine which checkboxes have been checked.
Considering that the injected HTML does not get sent back to the server during postback, I wonder what would be the most effective method to obtain my desired values?
My current thought is to utilize JavaScript to extract the values of the dynamic controls and save them to a hidden field within the page class just before triggering the postback.
If there are alternative approaches or better techniques to achieve this functionality, I would appreciate any suggestions shared!