hello my project is web discussion forum i want to show topics or articles title in table and make it hyperlink .
i want get data from database table and display in html table how its poossible...?
hello my project is web discussion forum i want to show topics or articles title in table and make it hyperlink .
i want get data from database table and display in html table how its poossible...?
Yes it's possible. You would build the table elements as you run through the results of your query.
Alternatively, if you use Visual Studio, you easily incorporate controls such as a Gridview (which renders as an HTML table).
yes i use visual stdio but i can't use gridview.
i use html table how can i get data from database and show in table.
You would build the table elements as you run through the results of your query.
As JorgeM has pointed out, you would build your TD/TR etc as you step through your loop.
Start and end your table outside of the loop:
<table>
<?php
WHILE LOOP/IF LOOPDO WHILE LOOP
?>
</table>
In the code behind as you read from the data source, you have to add the tr an td elements so that your output becomes a combination of HTML elements and data.
i can't understand do you have example....in asp.net
There are several examples online. Each using different methods. Here are some that I found:
http://www.w3schools.com/aspnet/showasp.asp?filename=demo_table2
http://msdn.microsoft.com/en-us/library/0e39s2ck(v=vs.80).aspx
http://msdn.microsoft.com/en-us/library/7bewx260.aspx
unfortunately, its going to be challenging to give you exactly the code you need. It all depends on what else is happening within the project.
This should at least give you enough to get an understanding. What you need to do is connect to the database and build the table and fill in the information as you read from the DB.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.