Results 1 to 7 of 7

Thread: [RESOLVED] DownloadStringASync-Somethings wrong

Threaded View

  1. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: DownloadStringASync-Somethings wrong

    It doesn't matter what you're trying to accomplish; if you don't use the right code then it won't work. The fact that some code worked for one file doesn't necessarily mean it will work for another file because the two files may be different. As I said in my previous post, you are explicitly try to split the file on CR/LF pairs. If the lines of the file are delimited by LF characters alone then there are no CR/LF pairs so the file won't be split. You can test that by trying to split that file on LF characters alone:
    Code:
    Dim htmlLines() As String = e.Result.Split(ControlChars.Lf)
    If that works where your other code doesn't then that is the issue for that particular file.

    As I also said in my previous post, if you want to be able to handle files that are delimited in both ways then you should use a StringReader.
    Last edited by jmcilhinney; Dec 25th, 2009 at 08:24 PM.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width