Unbound ASP.net Drop List

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

First
Second
Third
Fourth

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.
jordanhelenAsked:
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

0
 
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

0
 
Carlos VillegasFull Stack .NET DeveloperCommented:
DropDownList1.SelectedIndex = 0 will select the first item of your List
0
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.