protected void lbcategory_SelectedIndexChanged(object sender, EventArgs e) { Panelconstruction.Visible = false; SqlConnection sqlCon = new SqlConnection(); sqlCon.ConnectionString = "Data Source=PC-13\\SQLEXPRESS;Initial Catalog=DbPlacementCoordinator;Integrated Security=True"; sqlCon.Open(); string str = lbcategory.SelectedItem.Value; string query = "Select Industry_ID from Industry_Category where Industry_Name=@str;"; SqlCommand cmd3 = new SqlCommand(query, sqlCon); cmd3.Parameters.AddWithValue("str", str); int b = Convert.ToInt16(cmd3.ExecuteScalar()); string jobcat = "Select Job_Name from Job_Category where Industry_ID=@b;"; SqlCommand cmd4 = new SqlCommand(jobcat, sqlCon); cmd4.Parameters.AddWithValue("b", b); SqlDataReader reader = cmd4.ExecuteReader(); inbox.DataSource = reader; inbox.DataBind(); Panelconstruction.Visible = true; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)