Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27193

VS 2010 Automate serveral URL downloads at once from website document using WebBrowser contro

$
0
0
Hello,

I am using WebBrowser control in my code for get user input » submit it to web site form and trigger the submit button to get information from database, the website then displays several href with txt files that I will need the program to download automatically, I know that I could achieve this by using the SHDocVw.InternetExplorer however since I am using WebBrowser controls what could I use for this solution?

Code:

Imports System.Web
Public Class Form1
    Private Sub Submit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Submit.Click
        With WebBrowser1
            .Navigate("https://test.com")
            Do While .ReadyState <> WebBrowserReadyState.Complete
                Application.DoEvents()
            Loop
            With WebBrowser1
                Dim job As HtmlElement = Me.WebBrowser1.Document.All.Item("JobName")
                job.InnerText = TextBox1.Text
                Dim user As HtmlElement = Me.WebBrowser1.Document.All.Item("UsrName")
                user.InnerText = TextBox2.Text
                Dim dat As HtmlElement = Me.WebBrowser1.Document.All.Item("JobDate")
                dat.InnerText = dtp.Text
                .Document.GetElementById("Action").InvokeMember("Click")
               

        End With
        End With
    End Sub


Viewing all articles
Browse latest Browse all 27193

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>