My connection String
con.Open();
SqlCommand cmd = new SqlCommand("Select * from Table", con);
SqlDataAdapter Sda = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
Sda.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
con.Close();
I have taken gridview and i want to bind gridview using above code but record not fetching from table to gridview in Asp.net c# Web Page whats error kindly help me....


Darshan ShahRank #1,135 · 1.6K reputationPosted Aug 11, 2020, 10:54 PM EDT
Farhan AhmedRank #73 · 25K reputationPosted Aug 11, 2020, 3:59 AM EDT
Ajit Kulageri148 reputationPosted Aug 12, 2020, 8:51 PM EDT