Loading in HTML onto a page

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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"
 
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"
 
Back
Top