Reputation: 909
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
Reputation: 15271
How to handle script errors as a WebBrowser control host
Managed Wrapper
Upvotes: 3
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