Loading in HTML onto a page

G

Guest

I have a requirement to display multi formated Text within a Cell of a table

We currently use a label but the <span> command introduced automatically into the HTML at run time results in an invalid html page

e
<TD vAlign="top" width="450" height="200"><asp:label id="lblContent" runat="server" Width="450px" Height="320px"></asp:label></TD

become

<TD vAlign="top" width="450" height="200"><span id="lblContent" style="height:320px;width:450px;"><H3>Title<H3><P><B>Detailed Description</B></P><P>This is another problem to be solved</P></span></TD

Because of the header elements this is invalid. Any Suggestions?
 
M

Martin Dechev

Hi, Bob,

Try <asp:literal> instead of <asp:label>. It will render the content
directly in the parent control's inner html.

Hope this helps
Martin
Bob said:
I have a requirement to display multi formated Text within a Cell of a table.

We currently use a label but the <span> command introduced automatically
into the HTML at run time results in an invalid html page.
eg
<TD vAlign="top" width="450" height="200"><asp:label id="lblContent"
 
T

tomledk

You could use a LiteralControl instead of a label. The literal will only
display the content that you put in it.

tomledk :)

Bob said:
I have a requirement to display multi formated Text within a Cell of a table.

We currently use a label but the <span> command introduced automatically
into the HTML at run time results in an invalid html page.
eg
<TD vAlign="top" width="450" height="200"><asp:label id="lblContent"
 

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

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top