Results 1 to 6 of 6

Thread: vb.net reading a website

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2007
    Posts
    10

    vb.net reading a website

    In vb6 i had a program that i made to read a true or false statement on the website then i had vb6 check that statement. but now that im using vb.net i have no idea how to do that. any ideas thanks

  2. #2
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: vb.net reading a website

    I have no clue what you mean by "read a true or false statement and then check the statement". If you're looking to download the HTML of a website, use the WebClient:
    vb Code:
    1. Dim Html As String
    2. Using client As New System.Net.WebClient
    3.     Html = client.DownloadString("http://www.google.com")
    4. End Using
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2007
    Posts
    10

    Re: vb.net reading a website

    well here is how i had it set up from what i remember it was a few years ago.
    i had
    vb Code:
    1. dim websitetext as sting
    2. 'connect to the website it reads the site
    3. if websitetext = true then
    4. do something
    5. end if

  4. #4
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: vb.net reading a website

    What do you really mean by "reads the site"?
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  5. #5

    Thread Starter
    New Member
    Join Date
    Dec 2007
    Posts
    10

    Re: vb.net reading a website

    Well the site set up had no html, it was just a word i set the program to read True or False from the website.

  6. #6
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: vb.net reading a website

    Well if there is no html in the file, only a word (True/False), then download it like i showed you and compare it:
    vb Code:
    1. If DownloadedWord = "True" Then
    2.     'Do something
    3. Else
    4.     'Do something else
    5. End If
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width