Hello,
I have a dropdown list(combo box) that has all the US states listed in it. The value that gets sent to the Database would be "NY" if the user selected "New York" from the list.
Here is what my dropdown list is for example:
<select name="States">
<option value="FL">Florida
<option value="NY">New York
</select>
Now we have an edit screen to edit a users info. This is the question--- How do I get the dropdown list to show the correct state the user lives in if I am only storing the value "NY" in the database.
I know of one way:
<option value = "NY" <% if myState="NY" then response.write "Selected">New York
but I would have to do that for each option tag. And the client does not want to store the option values in a database so I can build the dropdown list by doing a loop.
How am I going to do this.....
Thanks....
I have a dropdown list(combo box) that has all the US states listed in it. The value that gets sent to the Database would be "NY" if the user selected "New York" from the list.
Here is what my dropdown list is for example:
<select name="States">
<option value="FL">Florida
<option value="NY">New York
</select>
Now we have an edit screen to edit a users info. This is the question--- How do I get the dropdown list to show the correct state the user lives in if I am only storing the value "NY" in the database.
I know of one way:
<option value = "NY" <% if myState="NY" then response.write "Selected">New York
but I would have to do that for each option tag. And the client does not want to store the option values in a database so I can build the dropdown list by doing a loop.
How am I going to do this.....
Thanks....