In a page I have drop down list which user use to do search. These drop downs are created dynamically from database so there number is not known.
Results are shown in next page which again has all drop downs in it. I need to show selected drop down values from previous page in results page but not sure what can be the best way to access selected drop down values from search page.
Please guide
THANKS 🙂
You have several options. You can either store the values in database or in
Session.Another option is to use the
PreviousPageproperty of the page when you transfer to the next page viaServer.Transfer.Cross-Page Posting in ASP.NET Web Pages
If that doesn’t work with dynamic controls on the preious page(never tested), you could try to use
Request.Form["DropDownList1"]to get the value.