kshadow22

Download HTML From URL Visual Basic

Jun 29th, 2015
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Imports System.Net
  2. Imports System.IO
  3.  
  4. Private Function getHTML(ByVal Adress As String) As String
  5.         Dim rt As String = ""
  6.         Dim wRequest As WebRequest
  7.         Dim wResponse As WebResponse
  8.  
  9.         Dim SR As StreamReader
  10.  
  11.         wRequest = WebRequest.Create(Adsress) 'Type in textbox info where it says address
  12.        wResponse = wRequest.GetResponse
  13.  
  14.         SR = New StreamReader(wResponse.GetResponseStream)
  15.  
  16.         rt = SR.ReadToEnd
  17.         SR.Close()
  18.  
  19.  
  20.  
  21.  
  22.  
  23.         Return rt
  24.     End Function
  25.  
  26.  
  27. Button1
  28. TextBox2.text = getHTML(TextBox1.text)
Add Comment
Please, Sign In to add comment