views:

328

answers:

2

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?

A: 

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. }

zipcodeman
it wont work since the error was generated on the HTML page rendered in the control and not in the application.
Jepe d Hepe
ah. Can you check the error code after displaying and then quickly change it. Although that might not be the best solution.
zipcodeman