弹出扩展"冷冻"在code-异常背后 [英] Popup extender "frozen" on code-behind exception

查看:215
本文介绍了弹出扩展"冷冻"在code-异常背后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个C#/ ASP.NET项目中,我们使用Ajax modalpopupextender显示处理中...的消息给用户。
我们使用了ASP.NET页面的code的JavaScript调用显示它。然后,在code的背后,我们正在做一些数据库的操作,并隐藏再次使用弹出popup.hide();

In a C#/ASP.NET project, we're using an ajax modalpopupextender to display a "Processing..." message to the users. We're displaying it using a Javascript call in the code of the ASP.NET page. Then, in the code behind, we're doing some database operation, and hide again the popup using "popup.hide();"

问题是,当异常在code后面出现,在弹出仍然显示和应用程序不处理错误,每web.config中的的customErrors标签。

The problem is that when an exception occurs in the code behind, the popup is still displayed and the application does not handle errors as per the "customErrors" tag of the web.config.

这是如何处理这种问题的任何想法?

Any idea on how to deal with this kind of issues?

谢谢,
大卫

推荐答案

你可以用你是在尝试捕捉运行code,并确保你在最后popup.hide打电话?

Can you wrap the code you are running in a try catch and make sure you call in the finally the popup.hide?

这篇关于弹出扩展"冷冻"在code-异常背后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆