Mid
From PDF
ADO.NET
ADO.NET
Call the DataBind() method to bind the data to the GridView.?
Short answer: Example: SqlDataAdapter adapter = new SqlDataAdapter("SELECT * FROM Customers", connection); DataTable dt = new DataTable(); adapter.Fill(dt); GridView1.DataSource = dt; GridView1.DataBind();
Example code
SqlDataAdapter adapter = new SqlDataAdapter("SELECT * FROM Customers", connection); DataTable dt = new DataTable(); adapter.Fill(dt); GridView1.DataSource = dt; GridView1.DataBind();
Real-world example (ShopNest)
ShopNest’s reporting job still uses ADO.NET for a heavy SQL query where raw performance and stored procedures matter more than EF convenience.
Say this in the interview
- Define — one clear sentence (the short answer above).
- Example — relate it to a project like ShopNest or your real work.
- Trade-off — when you would not use it.
Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png