vb.net intro brek to <br>

Hello folks, I need to resolve a problem and I dont know how.

I've  a field in my database with information like this

This is an example:
- text 1
-Text 2
- text 3
More text.....

When I retrieve the information, everything display like this

This is an example: - text 1 -Text 2 - text 3 More text.....

What
LVL 5
nkoriginalAsked:
Who is Participating?
 
Todd GerbertIT ConsultantCommented:
You can use .Replace to find any occurences of a newline/carriage return pair and replace them with "<br />" instead.
 

Dim theString As String = "The quick brown fox" & vbCrLf & "jumped over the" & vbCrLf & "lazy dog."

Label1.Text = theString.Replace(vbCrLf, "<br />")

Open in new window

0
 
nkoriginalAuthor Commented:
Thanks, great and fast answer
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.