Hello
I have nested gridview as parent and child. The footer of the child gridview is used for adding new records. Everything is working fine.
The problem is: When I press the refresh button found in the browser, new records are added!!!!
While debugging, I noticed that when the refresh button is pressed, it goes to the click event of the last pressed button which is the Save button which causes the new insertion of records.
In addition to using e.CommandName to find out which button was pressed via GridView.RowCommand, I added a session("KeyPressed") as another flag to find out which key was pressed to prevent the execution of the function that does the insertion of records to database.
The only place that I can put the flag is the click event of the save button.
So, Session("KeyPressed") = "save" will be assigned when ever a refresh is pressed!!!
How to solve ...
Go to the complete details ...