Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Every time that i press the refresh button....

Reply
Thread Tools

Every time that i press the refresh button....

 
 
wright
Guest
Posts: n/a
 
      10-21-2003
Hi,
I am facing a very odd problem.
I am using a datagrid in order to update a database.
In the database i have one table with an autoincrement field.
When i insert a record to the database, the record is inserted ok
but if i press the refresh button of my browser the record is being inserted
again.
Some how the last event fires again each time i press the refresh button.
I am using the viewstate command to preserve values between postbacks.

When i insert a new record the AddNewRecord property is set to true and when
i refresh the page this property is still set to true the insert event is
fired and the same record is being inserted.

How can i avoid firing the same event each time the user presses the refresh
button?
Note: I am using the code from ASP.NET Matrix example (Updateable datagrid)

Please help me.
Thanks in advance


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in running a basic code in python 3.3.0 that includes HTML file Satabdi Mukherjee Python 1 04-04-2013 07:48 PM
Re: Canon XT - doing full press without wating at half-press Wolfgang Weisselberg Digital Photography 0 10-25-2010 01:37 AM
Re: Canon XT - doing full press without wating at half-press Ray Fischer Digital Photography 0 10-24-2010 06:06 AM
Explorer.exe error report every time access every type of video me =?Utf-8?B?SXJ3YW5zeWFo?= ASP .Net 4 10-30-2007 07:49 AM
C program to automatically press F6 every few seconds findmadhav@indiatimes.com C Programming 40 06-14-2005 01:55 PM



Advertisments