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
2010-01-08 06:42:02
it wont work since the error was generated on the HTML page rendered in the control and not in the application.
Jepe d Hepe
2010-01-08 06:47:12
ah. Can you check the error code after displaying and then quickly change it. Although that might not be the best solution.
zipcodeman
2010-01-08 07:33:12
+2
A:
How to handle script errors as a WebBrowser control host
Managed Wrapper
Sheng Jiang 蒋晟
2010-01-08 14:58:54