Nimrod Yanai
Nimrod Yanai

Reputation: 819

Can I know if Webbrowser-control returned "page not found"?

This might be a yes or no question with a follow up: When I use a Webbrowser-control, is there a way for me to know if it returned a "page not found" error? For example using the .ReadyState property? If so, how?

If not, is there a simple method for doing this? Perhaps by checking page titles or something?

Upvotes: 0

Views: 827

Answers (2)

Nikhil Vartak
Nikhil Vartak

Reputation: 5137

based on this control: http://www.codeproject.com/KB/cpp/ExtendedWebBrowser.aspx there is NavigateError function, fires when an error occurs during navigation.

See the marked answer in this thread: How to know whether WebBrowser navigating a error page?

Upvotes: 0

i_am_jorf
i_am_jorf

Reputation: 54640

The LoadCompleted event should get a NavigationEventArgs which contains the WebResponse which has the headers you can inspect.

Upvotes: 2

Related Questions