Adding html content to a string.

A

Andy B

How do you add html content to a string and make it renter in the browser as
html? Do you just add the html markup to it?

Example would be something like:

<asp:CustomControl ID="Control" runat="server" TitleText="Turn this into
some html content" />
 
P

PvdG42

Andy B said:
How do you add html content to a string and make it renter in the browser
as html? Do you just add the html markup to it?

Example would be something like:

<asp:CustomControl ID="Control" runat="server" TitleText="Turn this into
some html content" />
You'll need to escape the "'s if you are going to turn it into a string
constant. Other than that, you'll need to provide additional details on
exactly how you intend to provide the string to the browser. Are you
planning to build the entire page from strings, or are you trying to insert
a string into an existing page?
 
A

Andy B

How do you add html content to a string and make it renter in the browser
You'll need to escape the "'s if you are going to turn it into a string
constant. Other than that, you'll need to provide additional details on
exactly how you intend to provide the string to the browser. Are you
planning to build the entire page from strings, or are you trying to
insert a string into an existing page?

I am not creating the entire page out of strings. I have a custom control
(collapsable panel) that I ended up getting from somewhere. One of the
properties is TitleText which works close to the same way the Text property
does for the asp:label control. My question is how do you add html markup to
the string to format it the right way.
 

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