Code Examples
  Home arrow Code Examples arrow Download a Web Page using the WebClient
Iron Speed
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Download TestComplete 
Windows Web Hosting
 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
CODE EXAMPLES

Download a Web Page using the WebClient
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 61
    2006-09-13

    Table of Contents:
  • Download a Web Page using the WebClient
  • Creating a Windows project to use the WebClient Class
  • Know your options
  • Create a form using the WebClient Control

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    Iron Speed
     
    ADVERTISEMENT

    Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    Download a Web Page using the WebClient
    (Page 1 of 4 )

    Users of the .NET framework can now display a web page and its source code at the same time. This functionality has been available for a while in VB6. In the .NET framework, it belongs to the WebClient class and the WebClient Control. Keep reading to learn how to use these handy tools.

    Introduction

    In the past you might have used the Microsoft Internet Controls (SHDOCVW.dll) and the Microsoft Internet Transfer Control 6.0 (SP4) in VB6 applications. The WebBrowser Control (SHDOCVW.dll) gives you the ability to display a web page in a Visual Basic Application. The Inet Control (Internet Transfer Control) gives you the ability to download and upload files to URLs. Please review the tutorial on the WebBrowser control used for downloading web pages. Given the URL, the two controls together can show the web page and its source at the same time.

    This basic tutorial shows how the same functionality is now available to .NET framework users by calling the methods and properties of the WebClient class, which belongs to the System.NET Namespace. In order to use this class, the Microsoft Visual Basic 2005 Express Edition (also Visual Studio 2005) can be used. The program can be downloaded from the Microsoft website. This beginners oriented tutorial also shows how to use the WebClient Control as well.

    You can find the WebClient in the .NET Framework Components page in the Choose Toolbox Items pop-up when you access it using the Tools-->Choose Toolbox Items... hyperlink. You can also find the WebBrowser Control in the same folder. You can also access these controls in the same exact manner in Visual Studio 2005, and the Visual Web Developer 2005 Express Edition.

    More Code Examples Articles
    More By Jayaram Krishnaswamy


       · You want to look at a web page in a windows application - the web client is a good...
     

    CODE EXAMPLES ARTICLES

    - Handling Animations and Bitmaps Using GDI+ f...
    - Download a Web Page using the WebClient
    - Creating a Chart using Data from a Database ...
    - The Basics of Charting with the MS Chart Con...
    - Searching Body Text with textRange: Enter th...
    - Searching Body Text with textRange: Building...
    - Searching Body Text with textRange, part 1: ...
    - First Steps in Programming
    - Programming in C
    - Quick Introduction to ASF,ASX, and Networkin...
    - SatView: Pointer Perfect, Part 2: Constructi...
    - SatView: Pointer Perfect, Part 1
    - Style Case Studies: Construction Unions
    - Creating an Engine for Games for Windows
    - Style Case Studies: Generic Callbacks

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway