Hi
I have dropdown list in my asp.net page.I wrote a below coing coidng in the SelectedIndexChanged
,
protected void cmb_Se_SelectedIndexChanged(object sender, EventArgs e)
{
SqlConnection con=new SqlConnection("Data Source=20.1.2.58;Initial Catalog=Customer;User ID=test123");
string str = "select ExecutiveName from Executive where TeCode='"+cmb_Te.Text+"'";
con.Open();
SqlCommand command=new SqlCommand(str,con);
SqlDataAdapter adpter=new SqlDataAdapter(command);
DataSet data=new DataSet();
adpter.Fill(data);
int i= data.Tables[0].Rows.Count;
for (int x = 0; i < i; i++)
{
cmb_Se.Items.Add(data.Tables[0].Rows[x].ToString());
}
}
I mention what is code i wrote in my page,But once i select the text from cmb_Te combo box,the below combo box in not change.Pls give me a answer.
Thank you