Text-based controls: Formatting as inline elements

  • Thread starter Thread starter Nathan Sokalski
  • Start date Start date
N

Nathan Sokalski

I have had a question that I have been avoiding or using workarounds for for
a while. When using text-based controls (Labels, HyperLinks displayed as
text, LinkButtons, etc.), how do I format certain parts differently? For
example, I might have a set of instructions that I want keywords displayed
in a different color, or there might be a certain word that I want to
display as a link. When the text is all on the same line, I can simply place
the controls next to each other. But when the text will need to wrap to the
next line, this causes a problem. It is also rather tedious to use so many
controls just for a few links. Does anyone know of an efficient solution to
this problem? Thanks.
 
How about using javascript to perform global replace on document.InnerHtml
at onload event? I've not tested it but I think it should work.
 
Back
Top