Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HTML Encoding
Message
From
03/04/2008 11:59:07
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:
01307878
Views:
12
Is there a list of characters I will need to do this for, or are spaces and line breaks it?

>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
Next
Reply
Map
View

Click here to load this message in the networking platform