SelectedIndexChanged

mattyfed

Member
Joined
Jul 2, 2004
Messages
9
Programming Experience
1-3
I have a drop-down menu, and a text box. When the user selects an item from the drop-down menu, I would like to have the textbox.text update to reflect the DropDown.SelectedValue

I know this should be easy but....

This code obviously is not working:
Private Sub DropDown_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DropDown.SelectedIndexChanged

txtBox.Text = DropDown.SelectedValue

End Sub

Any suggestions? Thanks.
 
For this I am just using a dropdown list containing 5 standard menu options, but, the overall goal is to have a dropdown list of states, which is fed by an DB table. When the user selects a state, the text box should automatically populate with the zip codes for that state (which are also stored in the DB).
 
It does seems that when I select an item from the dropdown, a postback is not occurring even though I have a Private Sub DropDown_SelectedIndexChanged

Should this force a postback?
 
Back
Top