protected void Button1_Click(object sender, EventArgs e) { string strConnection = ConfigurationManager.ConnectionStrings["MyConsString"].ConnectionString; SqlConnection conn = new SqlConnection(strConnection); SqlCommand cmd = new SqlCommand("Select * from Employeertable INNER JOIN Employeetable on Employeertable.Employeerid= Employeetable.Employeerid where Employeertable.Employeerid=" + DropDownList1.SelectedItem.ToString() + "", conn); conn.Open(); cmd.ExecuteNonQuery(); SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); conn.Close(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)