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 how to manage pagination in a page using .net?

971


What is the use of common language runtime?

1067


Explain me what is a design pattern and what is it for?

1087


Explain the difference between vb and vb.net?

1053


What is gac in .net?

1055


Tell us the difference between the while and for loop. Provide a .net syntax for both loops?

964


What is meant by globalization?

1039


Explain the difference between managed and unmanaged code?

906


what is prototype design pattern in .net

1011


How will you load dynamic assembly? How will create assemblies at run time?

2124


Difference between machine.config and web.config?

1033


Explain memory-mapped files.

1084


Please explain what are an inheritance, polymorphism, and encapsulation?

1092


How to debug failed assembly binds?

1037


Is there a way to suppress the finalize process inside the garbage collector forcibly in .net?

906