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开发者_如何学Python 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?
How to handle script errors as a WebBrowser control host
Managed Wrapper
- http://www.codeproject.com/KB/cpp/ExtendedWebBrowser.aspx
- http://www.codeproject.com/KB/miscctrl/csEXWB.aspx
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.
}
精彩评论