Click here to Skip to main content
15,909,030 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Comments
sravani.v 21-Apr-12 4:32am    
Can you share your code?

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.
 
Share this answer
 
Hi ,
read This
Here[^]
Best Regards
M.Mitwalli
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900