Solved

How to open a webpage using vb.net

Posted on 2014-01-07
3
288 Views
Last Modified: 2014-01-07
How do I open a webpage and parse the results of that page using VB.net?  I want to download and parse data from a page that I open.  I only need code on how to open the page and see the results of the page downloaded.  Thanks in advance.
0
Comment
Question by:TheChos
  • 2
3 Comments
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 500 total points
ID: 39763276
Dim webClient As New System.Net.WebClient()
Dim content As String = webClient.DownloadString("http://www.experts-exchange.com/Microsoft/Development/Q_28332710.html")

Open in new window


You can parse the content variable with any parsing method that works on a String.
0
 

Author Closing Comment

by:TheChos
ID: 39763362
Worth an A+.  Very quick response and easy to implement.  Thank you very much!
0
 
LVL 40
ID: 39763643
Thanks the programmers who designed the Framework. It's far from perfect, but there is often an easy way to do stuff.

It's just that finding what you need in these 10000+ classes is not an easy task.

It comes easier after 13 years or so :-).
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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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

20 Experts available now in Live!

Get 1:1 Help Now