Frederik
Frederik

Reputation: 652

Putting data from SqlDataReader into HTML table

I have some data in a database that I read out with SqlDataReader.

I want to put these in a HTML table in my ASP.NET site, but I can't figure out how to do so.

Upvotes: 2

Views: 1868

Answers (1)

Steve's a D
Steve's a D

Reputation: 3821

You can use a gridview. It is an asp.net control which you just bind your datareader to your gridview, and it will display every row that is returned from your database as an html table row. You can even combine two or more columns, and add pictures or links instead of just displaying the data with a templated row. Google it and you'll find lots of examples!

Upvotes: 1

Related Questions