WebClient Class : WebClient « Network Remote « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Date Time
8.Development
9.Event
10.File Directory
11.Generics
12.GUI
13.Internationalization I18N
14.Language Basics
15.LINQ
16.Network Remote
17.Reflection
18.Security
19.Thread
20.Windows Presentation Foundation
21.Windows System
22.XML
23.XML LINQ
VB.Net Tutorial
VB.Net by API
VB.Net » Network Remote » WebClientScreenshots 
WebClient Class
 
Imports System
Imports System.Net
Imports System.IO

Public Class Test

    Public Shared Sub Main(args() As String)
        Dim client As New WebClient()
        client.Headers.Add("user-agent""Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)")

        Dim data As Stream = client.OpenRead("http://google.com")
        Dim reader As New StreamReader(data)
        Dim As String = reader.ReadToEnd()
        Console.WriteLine(s)
        data.Close()
        reader.Close()
    End Sub 'Main
End Class 'Test

   
  
Related examples in the same category
1.Create WebClient class.
2.WebClient.Credentials gets or sets the network credentials
w__w__w_.j__a___v_a2s__.com__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.