I have a web page that has a placeholder on it called PlaceHolderText. I
read some html out of the database. The value for my test is:
this is <strong>a test </strong> of the html stuff
I read that into a variable that I call htmlData (it's a string)
htmlData = reader["html"].ToString();
Then, after making sure that htmlData is good and all, I do the following
two lines:
HtmlGenericControl ctl = new HtmlGenericControl(@htmlData);
PlaceHolderText.Controls.Add(ctl);
That outta show the data, with the appropriate words bolded. Instead it
shows the following (nothing bolded).
a test of the html stuff>a test of the html stuff>
Going through the debugger the value of htmlData is exactly what I expect it
to be. It gets muddied up by the htmlgenericcontrol
Anybody got a clue for me? Just a hint?

Signature
----------------------------------------
Magic is not in the hands of the magician but in the mind of the audience.
Animadverto est verus
Rik,
You aren't looking at your Intellisense. When you create an
HtmlGenericControl, it wants a tag name. Then you can set the other
properties (such as InnerHTML). Example:
private void Page_Load(object sender, System.EventArgs e)
{
string s="this is <strong>a test</strong> of the html stuff";
HtmlGenericControl ge = new HtmlGenericControl("div");
ge.InnerHtml=s;
this.PlaceHolder1.Controls.Add(ge);
}
BTW, this probably belongs on the ASP.NET newsgroup as it is quite "ASP.NET"
specific.
Peter

Signature
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
> I have a web page that has a placeholder on it called PlaceHolderText. I
> read some html out of the database. The value for my test is:
[quoted text clipped - 20 lines]
>
> Anybody got a clue for me? Just a hint?
Rik Brooks - 21 Aug 2006 16:04 GMT
Thank you, Peter, this works great.
I'll try to find the asp.net newsgroup. I didn't see it. You're probably
right that's where it belongs

Signature
----------------------------------------
Magic is not in the hands of the magician but in the mind of the audience.
Animadverto est verus
> Rik,
> You aren't looking at your Intellisense. When you create an
[quoted text clipped - 37 lines]
> >
> > Anybody got a clue for me? Just a hint?