how to join two datatable datas into one datatable to show in one gridview
i.e in 1 datatable i have username and pwd and in another datatable i have that user detai
@Ranjana have a look at this MSDN article it deals with what you want..
What you need is a join on the tables before reading them into a DataTable: SQL Joins
You can merge two datatable, here is the sample for that. http://msdn.microsoft.com/en-us/library/system.data.datatable.merge.aspx
on=new SqlConnection("Data Source=MCN101; Initial Catalog=MergeTable; Uid=sa; pwd=");
da = new SqlDataAdapter("Select * from Table1", con);
da.Fill(ds1, "Record");
da = new SqlDataAdapter("select * from Table2", con);
da.Fill(ds2, "Record");
ds1.Merge(ds2);
GridAllRecord.DataSource = ds1;
GridAllRecord.DataBind();