3
Answers

Gridview Bind In Asp.net C#

 
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.... 
Answers (3)