How to open a web page and save it as txt?

I assume this is a very easy question to answer and I saw a similiar one already but that didn't seem to do the trick for me.

Basically I want to open a site like below and then do a File-> Save Page(Save Page as in Mozilla) and set it as a text file.

That is it, I've been able to start a web page using System.Diagnostics.Process.Start and I tried
using the WebBrowser object and navigating to it but I couldn't figure out what do after that.

Just want something simple.

Who is Participating?
arif_eqbalConnect With a Mentor Commented:

Imports System.Net

        Dim Req As WebRequest
        Req = WebRequest.Create("")

        Dim Resp As WebResponse
            Resp = Req.GetResponse()
            Dim Sr As Stream = Resp.GetResponseStream()
            Dim SRdr As New StreamReader(Sr)
            Dim Str As String = SRdr.ReadToEnd()
            Dim SWrt As New StreamWriter("c:\site.txt")
         Catch ex As Exception
        End Try
brindelinAuthor Commented:
Thanks that was exactly what I was looking for.  Although I did have to change it to IO.Stream, IO.StreamReader, and IO.StreamWriter for anyone else using this as reference.

Thanks again.
Sorry forgot to say that you needed to Import System.IO as well
then you won't require the qualifier IO. just Stream would do
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.