Which is the best way to load text into a webpage using ASP.NET
I have 3 records in a MS SQL database table. Each record would correspond to a paragraph in a webpage.
Table:

The HTML code for the About us page would look like this (note I put the corresponding paragraphs) :
<div id="content-1b">
<div id="content-1-1b">
</div>
<div id="content-1-2b"><p class="none">paragraph 1</p>
<p class="nonetop">paragraph 2</p>
</div>
</div>
<div id="content-3b"><p class="nonetop">paragraph 3</p>
</div>
Regards,
Tea
Setting your divs or paragraph tags as runat=”server” with an ID will allow you to access innerhtml/text
HTML:
Running code like: (assuming your content is in a datatable and that you want the first item (0) from each row)
Will loop through your datatable, get the first column from each row and append the text to the paragraph tag.
Update:
For Single Content
If your SQL returns 3 rows, 1 for each area you want to fill simply do:
Assuming dt is the datatable you are filling and that the first column of each row is your content.