DataReader in ADO.Net
I have a grid view in dot net, and want to show all record in gridview with the help of data reader.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satyapriya NayakPosted Dec 4, 2012, 12:00 PM
Sandeep Singh ShekhawatPosted Dec 4, 2012, 9:16 AM
SqlConnection con = new SqlConnection(constring);
SqlCommand cmd = new SqlCommand("_sp_GetEmployee", con);
cmd.CommandType = CommandType.StoredProcedure;
con.Open();
IDataReader idr = cmd.ExecuteReader();
grdEmployee.DataSource = idr;
grdEmployee.DataBind();
Sivaraman DhamodaranPosted Dec 4, 2012, 7:42 AM
Krishna GaradPosted Dec 4, 2012, 6:07 AM