Ohhhh Peter, I'm so close. Now I get something. Here's my code:
// htmlData is read from db - for our test it is:
//this is <strong>a test </strongof the html stuff
// I know this is true cuz I used the debugger and peeked at it.
HtmlGenericControl ctl = new HtmlGenericControl(htmlData);
PlaceHolderText.Controls.Add(ctl);
.... and Peter, here is what is shown on my screen:
a test of the html stuff>a test of the html stuff>
Even if you can't help me, thanks for what you've done so far, Peter.
--
----------------------------------------
Magic is not in the hands of the magician but in the mind of the audience.
Animadverto est verus
"Peter Bromberg [C# MVP]" wrote:
OK, look:
1) Drag a Placeholder Control onto your page where you want the HTML to
display.
2) Get the HTML Out of your database, let's say its in a string variable
"strContent".
3)
HtmlGenericControl ctl = new HtmlGenericControl(strContent);
Placeholder1.Controls.Add(ctl);
That's it. In VB.NET:
Dim ctl as New HtmlGenericControl(strContent)
Placeholder1.Controls.Add(ctl)
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Rik Brooks" wrote:
Oh Gawd I wish I understood what you just said.
--
----------------------------------------
Magic is not in the hands of the magician but in the mind of the audience.
Animadverto est verus
"Peter Bromberg [C# MVP]" wrote:
How about adding the markup into a LiteralControl, which you can then hang on
a Placeholder control on the page?
>
http://msdn.microsoft.com/library/de...classtopic.asp
>
Peter
>
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
>
>
>
>
"Rik Brooks" wrote:
>
I am writing a web application using C#. I've come to the point that I need
to display some html text that is stored in a database. Is there a server
side control that I can use to show the html? In other words, read the data,
then set the Text property (or something else) and it displays in the window
--
----------------------------------------
Magic is not in the hands of the magician but in the mind of the audience.
Animadverto est verus