Want to work with us? We're on the lookout for digital experts.

We're hiring

Replace carriage return with HTML br tag

Web Bureau

21 August 2012 by Web Bureau

In a multi-line text box if you want to divide text into a number of lines/paragraphs without giving the user a WYSIWYG editor you can use this code:

strText.Replace(Environment.NewLine, "<br />")




strText.Replace(Environment.NewLine, "</p><p>")


Grow your businessStart a project with us today.

This site uses essential cookies for parts of the site to operate and have already been set. Find out more about how we use cookies and how you may delete them. You may delete cookies, but parts of the site will not work.