Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
HTML Encoding
Message
De
07/04/2008 14:54:08
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Versions des environnements
Environment:
ASP.NET
Divers
Thread ID:
01307769
Message ID:
01308814
Vues:
10
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/
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform