I am facing Problem while binding the data to the gridview
SqlCommand cmd=new SqlCommand("select*from emp",conn);
SqlDataAdapter da=new SqlDataAdapter(cmd);
Dataset ds=new Dataset();
da.Fill(ds,"empnew");
Gridemp.Datasource=ds.Tables["empnew"];
Gridemp.Databind();
5 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Amit Kumar100 reputationPosted May 15, 2018, 3:01 AM EDT
Basha Shaik32 reputationPosted May 15, 2018, 5:26 AM EDT
Amit Kumar100 reputationPosted May 15, 2018, 11:59 AM EDT
Manas TripathiRank #7,584 · 238 reputationPosted May 15, 2018, 1:20 PM EDT
Basha Shaik32 reputationPosted May 16, 2018, 9:09 PM EDT