Adding html content to a string.

  • Thread starter Thread starter Andy B
  • Start date Start date
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" />
 
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?
 
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.
 
Back
Top