Unbound ASP.net Drop List

I have an unbound asp.net drop list with items on the list of:


If the user selects "Second" this value goes into a text box.  
The item shown on the drop list remains "Second".
How do I get the list to refresh so that the first item is shown after the user's selection.

I am useing vb.net.
Who is Participating?
Carlos VillegasConnect With a Mentor Full Stack .NET DeveloperCommented:
Hello, using your DropDownList SelectedIndexChanged event and the SelectedIndex property, example:
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    MyTextBox.Text = DropDownList1.SelectedValue;
    DropDownList1.SelectedIndex = 0;

Open in new window

Carlos VillegasFull Stack .NET DeveloperCommented:
Sorry, VB.NET:
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
    MyTextBox.Text = DropDownList1.SelectedValue
    DropDownList1.SelectedIndex = 0
End Sub

Open in new window

Carlos VillegasFull Stack .NET DeveloperCommented:
DropDownList1.SelectedIndex = 0 will select the first item of your List
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.