I have a formview which using objectdatasource and default mode = insert... but after I inserted item if you refresh page inserting again and again....I tried Is.postback control but couldnt prevent this.Is there anyway to do it ?
相关问题
- Carriage Return (ASCII chr 13) is missing from tex
- Do the Java Integer and Double objects have unnece
- How to store image outside of the website's ro
- 'System.Threading.ThreadAbortException' in
- Request.PathInfo issues and XSS attacks
相关文章
- asp.net HiddenField控件扩展问题
- asp.net HiddenField控件扩展问题
- Asp.Net网站无法写入错误日志,测试站点可以,正是站点不行
- asp.net mvc 重定向到vue hash字符串丢失
- FormsAuthenticationTicket expires too soon
- “Dynamic operations can only be performed in homog
- What is the best way to create a lock from a web a
- Add to htmlAttributes for custom ActionLink helper
That is a common fundamental problem, which is a little harder to solve. There are a couple of ways to deal with it. You could use a means to detecting a page refresh, like this:
This is a server-side approach to responding to events; you could then cancel the insert programmatically. Another option is to check to see if the same data previously posted, and then don't do a double insert. Alternatively, we use the RadAjaxPanel from Telerik (though the UpdatePanel should work the same too) to handle this, as the POST operations are done through AJAX, so when you refresh it refreshes the original GET request.