Click here to Skip to main content
15,924,581 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi,i have two dropdownlist 1st dropdownlist has the list of Grades from R-12 and ECD on the same list. and the 2nd dropdownlist has list of schools for Grades R to 12 and ECD-School Uniond. so i want when you select Grade R-12 must show only the list of school for Grade R-12 and when you select ECD must show the list of ECD-Schools
Posted

Add ECD dropdown values in ispostback,then try below code,  

<pre lang="c#">protected void ECDdd_SelectedIndexChanged(object sender, EventArgs e)
    {
try
{

if (ds.Tables[0].Rows.Count > 0)
            {
                ECDschooldd.Items.Clear();
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    
                     ECDschooldd.Items.Add(ds.Tables[0].Rows[i].ItemArray[0].ToString());
  }


}                

  }
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900