Results 1 to 3 of 3

Thread: Web Browser inner text won't change

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2010
    Posts
    164

    Web Browser inner text won't change

    I'm trying to set the inner text by a button click on an htmlelement in my web browser but it's very unreliable.

    Code:
     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    
            uploadbrowser.Navigate("http://someurl.aspx")
    
        End Sub
    Code:
    Private Sub uploadbrowser_DocumentCompleted(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles uploadbrowser.DocumentCompleted
            If StatusBrowser = True Then Exit Sub
            Try
                    uploadbrowser.Document.All("Label1").InnerText = txtResults.Text
            Catch
                Exit Sub
            End Try
    Even after the document is completed the innertext rarely changes. Help please?

  2. #2
    Hyperactive Member
    Join Date
    Nov 2004
    Posts
    362

    Re: Web Browser inner text won't change

    it is because document complete may be fired several times depends on the page. you need check the document's url whether it is the one you want to load.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2010
    Posts
    164

    Re: Web Browser inner text won't change

    Don't understand, it only fires once for me and that URL is the only URL that uploadbrowser accesses.

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