Combobox problem

samsmithnz

Senior Contributor
Joined
Jul 22, 2003
Messages
1,038
Location
Boston
I have a combo box on an ASP page that is populated when the page loads. In certain instances the user can do something that triggers some javascript which removes all the items in the combobox and adds a new 'special' value.

The problem is that when I try to save the page again, the SelectedValue property seems to be reading the selected from when the page loaded not the new javascript created value... what can I do?
 
samsmithnz said:
The problem is that when I try to save the page again, the SelectedValue property seems to be reading the selected from when the page loaded not the new javascript created value... what can I do?
try putting a HTMLInputHidden (I think thats what its called) on your form mark it runat=server, when you jscript the combo, jscript it to the hidden, too. you will then have it available in the OnLoad during the next round trip. Just be sure to clear it before sending the page back to the user.
 
Back
Top