protected void Dd2_SelectedIndexChanged(object sender, EventArgs e) { s = Dd2.SelectedValue.ToString(); SqlCommand cmd2 = new SqlCommand("Select backlog FROM sprints where id = '" + Dd2.SelectedItem.Value + "'"); da2.SelectCommand = cmd2; da2.SelectCommand.Connection = con; da2.Fill(dt3); if (dt3.Rows.Count > 0) { selection = dt3.Rows[0]["backlog"].ToString(); } DataTable dt4 = new DataTable(); SqlCommand cmd4 = new SqlCommand("select * from master where [Backlog Name] = '" + selection + "'", con); da2.SelectCommand = cmd4; da2.SelectCommand.Connection = con; da2.Fill(dt4); Dd3.DataSource = dt4; Dd3.DataTextField = "feature"; Dd3.DataValueField = "feature"; Dd3.Items.Insert(0, new ListItem("select", "")); Dd3.DataBind(); con.Close(); }
protected void Dd2_SelectedIndexChanged(object sender, EventArgs e) { string s = Dd2.SelectedValue.ToString(); SqlCommand cmd3 = new SqlCommand("select * from master where [Backlog Name] = '" + s + "'", con); SqlDataAdapter sda = new SqlDataAdapter(cmd3); DataTable dtx = new DataTable(); sda.Fill(dtx); Dd3.DataTextField = "feature"; Dd3.DataValueField = "feature"; Dd3.DataSource = dtx; Dd3.DataBind(); }
protected void Dd2_SelectedIndexChanged(object sender, EventArgs e) { con.Open(); int CountryID = Convert.ToInt32(Dd2.SelectedValue); SqlCommand cmd2 = new SqlCommand("Select * FROM master where id='" + CountryID + "'"); da2.SelectCommand = cmd2; da2.SelectCommand.Connection = con; da2.Fill(dt3); Dd3.DataSource = dt3; Dd3.DataTextField = "feature"; Dd3.DataValueField = "feature"; Dd3.DataBind(); con.Close(); }