Source: C # WebBrowser gets Ajax information.
C # WebBrowser control on the implementation of Ajax, there is no response, it is difficult to determine whether Ajax has been executed, I GG an afternoon, find a way to introduce: If there is a <div on the page id=result></div > is using AJAX to change the value, when webbrowser1.statustext = = "Done", get the divhtmlelement target = WebBrowser1.Document.GetElementById ( "Result"); First judge, then add the response function if (target! = null) { target. Attacheventhandler ("Onpropertychange", new EventHandler (handler)); Where handler is the response function name. private void Handler (Object sender, EventArgs e) { HtmlElement div = webBrowser1.Document.GetElementById ("result"); if (div = = null) return; String x = div. InnerHtml; etc if (!x.equals ("Loading ...", stringcomparison.invariantcultureignorecase)) { //Now the element have been populated, do something } }