Tuesday, August 26, 2008

Avoid Insert Record on Page Refresh in asp.net

Avoid Inserting Duplicate Record on Page Refresh

Problem: User Input Form Inserts Duplicate Record on Page Refresh.

Solution:
This Problem can have 4 different solution, as mention in Article Preventing Duplicate Record on Page Refreshed

According to me among all mention solution, Page Redirect Solution is the best.

Use following piece of code, it will work efficient even with URL displayed with URLRewriting
Response.Redirect(Request.UrlReferrer.AbsoluteUri.ToString());

No comments:

Most Recent Post

Subscribe Blog via Email

Enter your email address:



Disclaimers:We have tried hard to provide accurate information, as a user, you agree that you bear sole responsibility for your own decisions to use any programs, documents, source code, tips, articles or any other information provided on this Blog.
Page copy protected against web site content infringement by Copyscape