unbinding a drop down list

cam1

New Member
I have two dropdown list. When I select a value in one the other one changes. I am using onselectedindex="action_here()"<BR>On the first drop down I have added an extra list called "select a category" then to my sub "action_here()" I have added<BR>sub action_here()<BR>If cat_id.SelectedItem.Value <> "Select a category" Then<BR>...<BR>End If<BR><BR>This works fine If I am selecting an value. My other drop down also changes accordingly. But when I select "Select a Category" in the first drop down, the second drop down still shows the value of the previously selected. Ideally it should have unbind the data.<BR><BR>This is creating a problem, How do I make the dropdown unbind if nothing is selected in the first dropdown list<BR><BR>Thanxsounds like you just need another section to your if statement. Checkout the ELSEIF line i add to your IF statement...<BR><BR>if cat_id.Selecteditem.value <> "Select a category" then<BR> 'do something here<BR>elseif cat_id.selecteditem.value = http://aspmessageboard.com/archive/index.php/"Select a category" then<BR> 'do something here like resetting the value of your other listbox<BR>end if
 
Back
Top