suchanoob
suchanoob

Reputation: 300

VB.NET: Convert multiline string into single line

I'm grabbing the HTML source code of a webpage and try to convert it to a single-line string but I can't.

This is my code:

Dim source As String = client.DownloadString("http://www.whocallsme.gr/el/master/lookup/19588")
source = source.Replace(vbCrLf, "")

I also tried using Environment.NewLine and vbNewLine instead of vbCrLf but the result remains the same.

Upvotes: 3

Views: 2556

Answers (1)

Rob
Rob

Reputation: 3863

Try this:

source = source.Replace(vbLf, "").Replace(vbCr, "")

Upvotes: 3

Related Questions