Solved

Read text File from a website into a vb.net win form

Posted on 2013-01-15
3
612 Views
Last Modified: 2013-01-15
I am trying to read a text file into a scrolling label control in a vb.net win form.
The problem is i'm getting   URI not Supported
Code is
Dim fsStream As New FileStream("http://powerzsoftware.com/Nba/Grizzlies.txt", FileMode.Open, FileAccess.Read)
            Dim srReader As New StreamReader(fsStream)

            Try
                srReader.BaseStream.Seek(0, SeekOrigin.Begin)
                While srReader.Peek() > -1
                    Label6.Text = (srReader.ReadLine())
                End While
                srReader.Close()
            Catch ex As IOException
                Label6.Text = (ex.Message)
            End Try
0
Comment
Question by:powerztom
  • 2
3 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 38779391
Use the my.computer.network.downloadfile method to first download the file and then open it

http://msdn.microsoft.com/en-us/library/ack30t8y(v=vs.90).aspx
0
 

Author Closing Comment

by:powerztom
ID: 38779999
Clever Idea Thank You.

powerzsoftware.net
Powerzsoftware.com
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38780009
Can you explain that grade?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now