Web应用程序中的页面刷新问题 [英] problem in page refreshing in web application

查看:79
本文介绍了Web应用程序中的页面刷新问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在.net中创建Web应用程序.我的问题是,
当以某种形式插入和删除记录时,但是在刷新页面后,记录将第二次插入吗?为什么

I am Creating web application in .net. and my problem is,
when record is inserted and deleted in a form but, after i m refreshing a page then record is inserting second time? why

推荐答案

插入被前端多次触发.按浏览器的刷新"按钮或按F5按钮将被触发并且可以复制数据.
请查看本文以解决此问题: ASP.Net中的刷新页面问题 [ ^ ]

尽管除了在前端处理它之外,您还应该在后端进行某种检查以检查潜在的重复项,以使其具有强大的设计能力(如果数据很关键),例如跟踪数据输入的日期时间和是否输入的最后数据在内部相似的示例一个非常接近的时间范围,然后在插入之前发出警告.
通常,对于简单的应用程序,为了避免出现上述问题,请访问我分享的文章链接,这应该会对您有所帮助.
Insertion is being trigger more than once from frontend. Pressing ''Refresh'' button of browser or pressing a F5 button would be triggered and data can be duplicated.
Have a look at this article to workaround it: Refresh Page Issue in ASP.Net[^]

Though, apart from handling it at frontend, you should also keep some kind of check at the backend for potential duplicates to make it a strong design (if data is critical), example track data entry with datetime and if last data entered is similar within a very close timeframe then raise a warning before insertion.
In general for simple apps, just to avoid the issue mentioned, follow the article link I shared and that should help you out.



阅读此
Hi ,
read This
Here[^]
Best Regards
M.Mitwalli


请参阅以下内容可能对您有帮助:

> http://stackoverflow.com/questions/1984090/new-row-inserted- for-each-page-refresh [ ^ ]

http: //stackstackflow.com/questions/7527243/save-button-click-event-getting-fired-up-refreshing-the-page-once-done-with-b [
Refer these may help you:

http://stackoverflow.com/questions/1984090/new-row-inserted-for-each-page-refresh[^]

http://stackoverflow.com/questions/7527243/save-button-click-event-getting-fired-up-on-refreshing-the-page-once-done-with-b[^]


这篇关于Web应用程序中的页面刷新问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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