Writing text to a specific area in a control

G

Grant Mills

I want to print out text to a specific area of a control, using code-behind.
and have it display in the correct format, as well it has to display all
html tags correctly.

I've tried using a ASP:label, but that doesn't do text formatting correctly
(no linefeeds)
a TextArea displays the text correctly, but <img> tags just print out.

Is there a way to have a <p id="X"> and with code behind, do a X.innerhtml =
, or X.Innertext =

?




-Grant Mills
 
A

Alessandro Zifiglio

hi Grant,
<p id="p1" runat="server"></p>

declare p1 as an HtmlControls.HtmlGenericControl in your code behind and
access its properties.
 
G

Grant Mills

Thank you soooo much ! :)

I got the <p> working, though that didn't keep my text formatted, so I just
changed it to a <pre> tag, and now everything works perfectly!!! ^_^


This just made my day!


-Grant
 

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

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,835
Latest member
KetoRushACVBuy

Latest Threads

Top