protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { SqlConnection conn = new SqlConnection(str); SqlCommand cmd = new SqlCommand("spshow",conn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@var", ddlshow.SelectedValue); SqlDataAdapter adp = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); adp.Fill(ds); try { conn.Open(); gdshow.Visible = true; gdshow.DataSource = ds; gdshow.DataBind(); } catch (Exception E) { Response.Write(E.Message); } finally { conn.Close(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)