|
-
Nov 29th, 2010, 02:24 PM
#1
Thread Starter
Frenzied Member
Got To Webpage without using webbrowser control?
Got To Webpage without using webbrowser control?
If so, how would i read / get the html of this page? I can do this now with a webbrowser control, but just looking for a quicker way.
I've seen this online below.
Imports System
Imports System.IO
Imports System.Net
Module Module1
Sub Main()
'Address of URL
Dim URL As String = http://www.c-sharpcorner.com/default.asp
Dim request As WebRequest = WebRequest.Create(URL)
Dim response As WebResponse = request.GetResponse()
Dim reader As StreamReader = New StreamReader(response.GetResponseStream())Dim str As String = reader.ReadLine()
o While str.Length > 0
Console.WriteLine(str)
str = reader.ReadLine()
Loop
End Sub
End Module
However, if the site requires you to log in first, can you then do a webrequest call, and have it use he webbrowsers controls cache to see that you've already logged in, and not request you to log in?
Hope this makes sense.
Last edited by joefox; Nov 29th, 2010 at 02:38 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|