Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

How to retain carriage returns or line breaks in an ASP.NET web page

$
0
0

Hi ,

 I am using asp.net framework 1.1 and my program is storing some values in a textarea field.

Database: aaa bbb ccc

But when my program retrieve the value out and display on the screen, it will show as one line 'aaa bbb ccc'. I have tried to code in my codebehind to txtarea1.Text = Obj.a.Replace(Environment.NewLine, "<br/>"); but it will show me as 'aaa<br/>bbb<br/>ccc' on the screen. When I opened the html page, the source is actually showing aaa&lt;br/&gt;bbb&lt;br/&gt;ccc.

Appreciate anyone who can help me.    


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>