writing HTML....how?

G

Guest

Dear Helper,
I would like to write some text retrieved from a database of a web form.
However, if this text contains links to web sites or e-mail addresses I would
like to render them as Hyperlinks. More than that, I would like to write that
certain text somewhere, let's say inside a table's cell.
Now, I have tried Response.Write() , and it works great except the text
appears at the beginning of the page. (do i have to generate the whole page
myself?..can't i just insert some HTML?)
Another thing I tried was inserting the text(already formatted to support
the hyperlinks "<a href... />") into a textbox but then the controls are not
renderd as Hyperlinks, just plain text.
So, can anybody help me with this?
Thank you!
 
D

DalePres

You can create a PlaceHolder object, then create a HtmlTable control,
populate the HtmlTable with your data in a for or while loop, and then use
the Controls.Add method of your PlaceHolder to put the table where you want
it.

I would suggest though, that you investigate the DataList, DataGrid, and
Repeater controls. You can create a custom control by inheriting any of
those controls, or you can just handle the ItemDataBound event for any of
these controls and format the data item to display how you want it.

You may want to look up those keywords in the MSDN library as a starting
point.

Good luck,

DalePres
MCAD, MCSE, MCDBA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top