Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HTML Encoding
Message
From
07/04/2008 14:54:08
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
 
General information
Forum:
ASP.NET
Category:
Other
Title:
Environment versions
Environment:
ASP.NET
Miscellaneous
Thread ID:
01307769
Message ID:
01308814
Views:
9
I tried \r, but it didn't work. I instead used Environment.NewLine and it did work. Thanks for the help!

>Mike,
>
>Use the Replace() method of the string to replace carriage returns with the break tag. You can do a similar process for spaces.
>
>
>somestring.Replace("\r", "<br/>")
>
>
>Kurt
>
>>Not sure if the title is exactly the right term...
>>
>>I have a string I am building using stringbuilder. It has several lines breaks, spaces, etc. When I try to display that on my webform it cuts out the line breaks and I'm pretty sure it's cutting out some spacing also. What is the best way to preserve this formatting?
>>
>>Thanks!
Very fitting: http://xkcd.com/386/
Previous
Reply
Map
View

Click here to load this message in the networking platform