Wednesday, August 11, 2010

How to bind gridview to datareader in asp.net 2?

How to bind gridview to datareader in asp.net 2?How to bind gridview to datareader in asp.net 2?
You really wouldn't want to use a datareader at all for grid binding, since it is the wrong kind of connection - you don't want a record-at-a-time real time reader for a rendered control. Use a DataTable (fill it with a SqlDataAdapter or an OleDbDataAdapter.)





Then attach it by declaring the DataTable the .DataSource of the gridview and calling Page.DataBind()How to bind gridview to datareader in asp.net 2?
Dude, it's not like your question provided much in the way of details. You asked a question, and got the right answer. The code? That you can write....

Report Abuse


  • web hosting talk
  • loan
  • No comments:

    Post a Comment