473,396 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Refresh button resubmitting data - How to prevent this?

My application is written in .NET (C#) with the inline Edit mode from
DataGrid. When a SAVE button is pressed it will perform a action on the
database either to add, edit or delete data that a user has entered.
When the refresh button is pressed at the top of the page the same
exact data is re-submitted again resulting duplicate transaction in the
database. Is there anyway of stopping this happening? From client-side
script, how can we detect that the "Refresh" button is click? thanks a
lot.

Dec 1 '06 #1
1 5791

"Andy" <ha***@intel.comwrote in message
news:11*********************@80g2000cwy.googlegrou ps.com...
My application is written in .NET (C#) with the inline Edit mode from
DataGrid. When a SAVE button is pressed it will perform a action on the
database either to add, edit or delete data that a user has entered.
When the refresh button is pressed at the top of the page the same
exact data is re-submitted again resulting duplicate transaction in the
database. Is there anyway of stopping this happening? From client-side
script, how can we detect that the "Refresh" button is click? thanks a
lot.
This group covers classic asp. ASP.NET is a totally different technology and
has its own group: microsoft.public.dotnet.framework.aspnet.

Mind you, a google search of 'datagrid prevent duplicate insert' would be a
quicker route to a solution.

Here - I've done it for you:
http://www.google.co.uk/search?hl=en...e+Search&meta=

--
Mike Brind
Dec 1 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Mark | last post by:
I have a working PHP/MySQL application used for data entry. The data entry screen includes a "Save" button. The PHP code for this button looks like this: if (isset($_POST)) { if ($_POST ==...
1
by: Ken Williams | last post by:
I made a web app, some form data is posted to a report.html that makes changes to a database. if the user does this and views the report, and then refreshes the web page the same information and...
7
by: al | last post by:
Greetings all, I use request.form("textbox1") to get data back to page, dim str as string str = request.form("textbox1").tostring But str is always empty after refresh???? I use asp.net...
2
by: User | last post by:
Hi ! I have a sql insert function with a buttonin my page, and when i click on refresh button of IE. When i click my button, i have a new records but after when i click on the refresh button of IE...
8
by: Nathan Sokalski | last post by:
I have a form that submits data to a database. If I click the browser's refresh button after submitting the form once, the form is submitted a second time. How can I avoid this problem? Thanks. --...
4
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi. If an ASP.NET page postsback, for example, after a button is clicked, and then I refresh the page (ie, by pressing F5 key), why does the same event occur when I press F5 as it did when I...
9
by: Navaneet | last post by:
Hi, Can anyone tell me how to prevent some particular POST DATA when refresh button (F5) clicked on server side(vb.net). Thanks Kumar N
5
by: SimonZ | last post by:
When user insert some data on page and click save button this data is inserted to database. If he clicks refresh button, the data is saved again each time when he clicks this button. I would...
4
by: =?Utf-8?B?QXNhZg==?= | last post by:
Hi, How can I prevent from an ASP.NET page to resend all the data again when the user press the Refresh button or F5 on the browser? Thanks in advanced, Asaf
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.