Download webpage to DB

Hi All,

I have a project where I need to download a webpage and save parts of a table to my DB.

Is there an easy way to do this is vb.net I have searched google but have not found any good examples.

TIA




Answer this question

Download webpage to DB

  • Bingo Boy

    most likely you would need to do alot of html parsing etc... (string parsing)

    you could use a WebBrowser control, the advantage being that you can access elements easily via the htmldocument property.

    http://msdn2.microsoft.com/en-us/library/system.windows.forms.webbrowser.aspx



  • Jefy

    OK. I Should hvae been more clear.

    I need to get certian parts of the page so I need to prase the HTML and split it in to the seperate parts.

    Not sure if there is an easy way to seperate the parts of the HTML page or i need to write a custom script for this.

    Saving to the DB is no problem I know how ot do that.


  • cgraus

    well you need to read the webpage (either using a webbrowser and read it in the document_completed event or use an httpwebrequest/webresponse classes to get the webresponse (the webpage))

    once you have your content, simply insert it into the database. There are examples on these forums for both SQL and MS Access on how to insert records :-) Try a search, see what it comes up with and if you need more help, feel free to post back!



  • Download webpage to DB