W
wright
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
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