Bhavesh Vankar

Bhavesh Vankar

  • 1.6k
  • 341
  • 5.5k

Gridview Bind In Asp.net C#

Aug 11 2020 7:22 AM
 
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.... 

Brought to you by:

Answers (3)