Browser Refresh in asp.net

Posted by prashant12-7256 under Regular Expressions on 1/10/2011 | Points: 10 | Views : 1717 | Status : [Member] | Replies : 3
Hi friends,

How to avoid Duplicate insert of data on Browser Refresh ?


Thanks




Responses

Posted by: Karthikanbarasan on: 1/10/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Hi,

Check for the ispostback property to see for the refresh and handle your requirement as such... so it avoids inserting a new record on refresh

Thanks
Karthik
www.f5Debug.net

prashant12-7256, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Suresh.mekkattil on: 1/11/2011 [Member] Bronze | Points: 25

Up
0
Down
HI,

There are 2 ways.

First,
As said earlier Check the IsPostBack property of the page

Second,
Check the condition before inserting the values, for is there any record exist with the matchig record

-----
Suresh M

prashant12-7256, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Prabhakar on: 1/18/2011 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi Prashant@12...

there is two way firstly u use !IsPostBack on Page load then
Second u are insert Validating Control on ur form .. On proper Validation not inserting in Browser Refreshing .

Hope fully it's working

T hank's & Rgrads
Prabhakar

Best Regard's
Prabhakar

prashant12-7256, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response