Connect with Expertise | Find Experts, Get Answers, Share Insights

Cannot detect newline character in string downloaded from the internet.

 
Join Date: Oct 2008
Posts: 19
#1: Dec 22 '09
The string is coming from this url, http://www.elixirwd.com.au/test.php

The Username and Password for this url is,
Username:user
Password: password

Now simply downloading the data using the WebClient classes DownloadString() method the below code will not work.

Expand|Select|Wrap|Line Numbers
  1. If FileContents.Contains(ControlChars.NewLine) Then
  2.             MessageBox.Show("Has newline!")
  3.         End If
It will not detect a newline character. Why?

Thanks Alex.

ssnaik84's Avatar
C
 
Join Date: Aug 2009
Location: Bengaluru, India
Posts: 150
#2: Dec 22 '09

re: Cannot detect newline character in string downloaded from the internet.


try..

Expand|Select|Wrap|Line Numbers
  1. Environment.NewLine
 
Join Date: Oct 2008
Posts: 19
#3: Dec 22 '09

re: Cannot detect newline character in string downloaded from the internet.


Nah same result... any other ideas?

thanks
Reply

Tags
newline, vb.net, webclient