con = new SqlConnection(strConString);
con.Open();
cmd = new SqlCommand("select * from Empdetails", con);
cmd.CommandType = CommandType.Text;
Da = new SqlDataAdapter(cmd);
Ds = new DataSet();
Da.Fill(Ds, "Empdetails");
cmd = new SqlCommand("select * from EmpTable", con);
cmd.CommandType = CommandType.Text;
Da = new SqlDataAdapter(cmd);
Ds = new DataSet();
Da.Fill(Ds, "EmpTable");
Grdtables.DataSource = Ds.Tables[0];
Grdtables.DataBind();
con.Close();
Ds.Tables[0].Merge(Ds.Tables[1]);
Dt = Ds.Tables[0];
for (i = 0; i <= Dt.Rows.Count - 1; i++)
{
Response.Write(Dt.Rows[i].ItemArray[0] + " -- " + Dt.Rows[i].ItemArray[1]);
}
}
Please give me the solution.