I'm using C# for code behinds in a ASP.NET site.
Users are entering information into a database and later display same. Some entries have hard returns in them and when it's redisplayed, the hard returns are of course not recognized and the formatting is thus wrong.
I need a way to replace the hard returns at display time with <br>. I have tried
DisplayString.Replace(char(13), "<br>"
DisplayString.Replace("\r\n", "<br>"
I of course know why the above didn't work, but i was swinging at a hope and a prayer.
Is there any way to use the Default "String.Replace" instead of having to dive into regex parsing?
Any assistance is greatly appreciated for this programming neophyte.
Users are entering information into a database and later display same. Some entries have hard returns in them and when it's redisplayed, the hard returns are of course not recognized and the formatting is thus wrong.
I need a way to replace the hard returns at display time with <br>. I have tried
DisplayString.Replace(char(13), "<br>"
DisplayString.Replace("\r\n", "<br>"
I of course know why the above didn't work, but i was swinging at a hope and a prayer.
Is there any way to use the Default "String.Replace" instead of having to dive into regex parsing?
Any assistance is greatly appreciated for this programming neophyte.