Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can we use data reader to bind gridview?

Answer Posted / swathi

this is also same as the Dataset.
these are steps:
1. SqlConnection con=new SqlConnection(ConnectionString);
2. SqlCommand com=new SqlCommand("Select * from
TableNAme",con);
3. SqlDataReader dr;
4. con.open();
5. dr=com.ExecuteReader();
6. Datagrid1.DataSource=dr;
7. DataGrid1.DataBind();

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe the programming model of a windows service

1103


Explain .net framework overview?

1115


Why do we use msmq?

1057


State the differences between the dispose() and finalize().

1079


Why you want to leave your previous company.

2176


What is il in vb.net?

1082


What is singleton activation mode in .net?

1201


What is .net standard?

1298


Explain the difference between task and thread in .net?

1033


Explain the procedure to add assemly to gac to make it shared one?

1051


What is manifest in .net?

1162


Explain me how does linq work?

1250


Can you edit data in repeater control? How?

1024


What is value type and refernce type in .net?

1110


What is clr in .net?

1142