Jepe d Hepe
Jepe d Hepe

Reputation: 909

catch error created after loading page in webBrowser Control in C#.net

I would like to know how to handle the runtime error generated on the page after being rendered in the webbrowser Control in C#.net, is there a way to catch it or prevent it from showing in the forms?

Upvotes: 1

Views: 3700

Answers (2)

zmbush
zmbush

Reputation: 2810

You should wrap the call that throws an error in a try catch block

try{ //code that throws an error }catch (Exception e){ //handle the error here. }

Upvotes: 0

Related Questions