Sub web1_docCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgsHandles Webbrowser1.DocumentCompleted If WebBrowser1.Url.ToString.Contains("process1.php") Then WebBrowser1.AllowNavigation = False DoStuff() End If End Sub Sub DoStuff() ' Stuff to do here WebBrowser1.AllowNavigation = True WebBrowser1.Navigate(URL.com/process2.php) End Sub
The problem comes with the fact that when we access process1.php, the webbrowser never accesses the "DocumentCompleted" handler. Because of this, I'm not able to throw the "DoStuff()" command in between these redirects and stall them. If anyone has some ideas, or a way to do this let me know, thanks. I traced it out with fiddler under normal circumstances and it shows it Posting to process1 and then Getting from process2. Which is right, i just need to know how i can make sure webbrowser1.documentcompleted is invoked between 1 and 2.