Webbrowser.Documentcompleted and the ReadyState property

30 במרץ 2008

I had previously tried using the WebBrowser class to retrieve a web page for analysis (using the DocumentText property).


The problem was determining the state of the page load (since a page requires several hits before completion on average).


Turns out I need to check on track backs to my post, as Anthony Stevens (you should read his "about" page) found a solution to my problem:

Once the page load is complete WebBrowser.ReadyState property will be set to Complete, and then you can take the loaded page and wreak havoc on it.

הוסף תגובה
facebook linkedin twitter email

כתיבת תגובה

האימייל לא יוצג באתר. שדות החובה מסומנים *

תגובה אחת

  1. ScriptFanatic30 במרץ 2008 ב 23:40

    You can also check the WebBrowser.IsBusy Property (inside a while loop).
    It indicates whether the WebBrowser control is currently
    loading a new document.

    Shay Levy
    $cript Fanatic