DropDown List Selection

Total Post:117

Points:821
C# 
C#
 1112  View(s)
Ratings:
Rate this:

I have three DropDown List Controls.each dropdown contains the static values 1,2,3,4 what i need to do is when a item is selected on the first dropdown(on SelectedIndexChanged Event) same items should be selected in other two dropdowns

  1. Post:378

    Points:2694
    Re: DropDown List Selection

    Hi Jay, 


    All you need to do is set the SelectedIndex of your other drop down lists like this:

    protected void DropDownList1SelectedIndexChanged(Object sender, EventArgs e)
    {
       dropDownList2.SelectedIndex = dropDownList1.SelectedIndex;
       dropDownList3.SelectedIndex = dropDownList1.SelectedIndex;
    }

      Modified On Apr-04-2018 06:40:47 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!