asp:label not formatted

G

Guest

I'm using an asp:label to display source code on my web page. The source code
is formatted with carriage returns, tabs and spaces. In the past, all I had
to do was wrap the label in a <pre> element and it was fine. But this time,
when I wrap my asp:label inside a <pre> element, it's only recognizing the
carriage returns but not the tabs or spaces.

When I view the source code in NotePad, everything is properly formatted. So
how do I display it in an asp:label?

Is there something I'm not doing?

Ray
 
K

Karl

When I do something like:
lbl.Text = "this is a test" & System.Environment.NewLine & "
duh " & vbTab & "asdsdd"

it works fine. I'm thinking maybe your source text isn't right.. Like
maybe your Carriage returns are just \r and not \r\n or something...

Karl
 

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,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top