I've my data in a Database. Using SQL,I need to print it on a list
For example,
My Table is: Teachers, and it has ID, Name and Phone#.
I need a button which shows all this data in a list. My first thought is with a DataGridView..

ID Name Phone
01 John 4444
02 George 9999
.
.

Any ideas how

Hi,
You can use a GridView, ListView or a repeater control (for HTML) to do this. They can all be bound to the data extracted from the database. I normally extract the data into a dataTable and use the DataSource = dataTable method of the Grid,List or Repeater to connect the two.

The GridView is probably the easiest.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.