Display html to my asp.net page from code

S

Sam

I have a string that is html that I retrieved from the database.

I want to from the code behind display it on a portion of web page.
Like perhaps in a textbox control or inside a <td> tag, or something.

I tried a textbox control, but it shows the tags, not the formatted
html.

I am VERY new to asp.net. This is my first time working with it. I
assume there must be a way to do it

Is there? Thanks!
 
T

tomisarobot

<td id=blah runat=server />


blah.Controls.Add(new LiteralControl("your html here"));


There is also a PlaceHolder control which you should read up on.
 

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

Top