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

Explain the features that are common to all .Net languages.

1163


What is multiThreading in .NET?

1054


What's wrong with a line like this? Datetime.parse(mystring);

1021


What is concurrency? How will you avoid concurrency when dealing with dataset?

1191


How does cas works?

998


What is interface and abstract class in .net?

1040


How to implement getcommon method in class a? Are you seeing any problem in the implementation?

1073


Tell us what is a variable of implicit type and what is its scope?

1023


What are the new features of Framework 1.1 ?

16674


What does jit do?

1165


What method do you use to explicitly kill a users session? How?

1028


What is the difference between .net and laravel?

1031


What is the difference between reference type and value type?

938


What is lazy initialization?

1064


Explain the difference between managed and unmanaged code?

919