2013-09-05 83 views
0

我正在开发一个在asp.net 2.0中的应用程序。 在一种形式中,我有一个按钮,并点击它将数据插入到数据库中。 现在插入后,如果我点击弓箭刷新按钮,我收到以下错误。ASP.NET中的浏览器刷新错误

Refresh detected Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Refresh detected

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): Refresh detected]
WebTemplate.Template.RefreshProtectModule.appl_AcquireRequestState(Object source, EventArgs e) +351
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

在此先感谢..

回答

0

击中刷新实际上是相同的按一下按钮,再次插入数据。您的按钮点击事件应该可能会将用户重定向到新页面。

0

显然你正在使用一种叫做“RefreshProtectModule”的东西,它不允许刷新。一方面这是很好的 - 否则你的表单会在每次刷新时向DB中插入记录。另一方面 - 你必须处理“刷新检测到”异常,并亲切地处理它。

+0

感谢您的回复。你能建议一个更好的方式来处理“刷新检测”并抑制请求。 – BABA

+0

对不起,我不熟悉这个模块,它可能是自定义的东西 - 检查你的网站设置,并与必须安装它的人交谈 –