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

What is .net standard?

1112


Difference between dispose and finallize method?

1135


What is data type and how many types of data types are in .NET ?

1017


Which namespace is used to support multithearding in .NET?

960


Explain attributes in dot net?

997


Explain soap and xml?

979


What are Attributes in .NET?

1033


What is the difference between reference type and value type?

893


What is .net3.0 and .net3.5?

950


What tools can I use to develop .net applications?

961


What are multicast delegates?

1023


How will you make .NET programs work in Linux ?

1979


What is the difference between vb.net and vc#.net?

1098


How do you turn off cookies for one page in your site? Give an example.

909


How server form post-back works?

1042