2

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.

3
  • you can use the grid view or the list view such type of data controls to display the data from the database on to the html files Commented Oct 25, 2012 at 11:00
  • Your question is too vague. Please read some online tutorials on how to work with ASP.NET and come back when you've got a more specific question about this. Commented Oct 25, 2012 at 11:03
  • @Steven I do have some basic knowledge about ASP.NET, but I just need some code examples for how to get data from a database into a HTML table. Commented Oct 25, 2012 at 11:21

1 Answer 1

1

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!

Sign up to request clarification or add additional context in comments.

1 Comment

This is just the solution I need. Thanks :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.