Click here to Skip to main content
15,911,785 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a grid view control which is filled in page_load event using dataTable. And added a link button to every records to delete particular record. And it work fine. But when I refresh my web page after deleting particular record it will delete again next record.
Posted
Comments
Prasad_Kulkarni 25-Jul-12 2:05am    
Post your code snippets.
sandeep nagabhairava 25-Jul-12 7:37am    
bind your grid in delete button...

Hi ,
You have to check on page refresh Check this Article Detecting Page Refresh[^]
or you can use AjaxControlToolkit.dll.Refresh

C#
if(!IsRefreshPage1.IsRefresh)
{
//Make your insert , update , delete 
}


Best Regards
M.Mitwalli
 
Share this answer
 
Hi,
After deleting your record in the delete command add one more line:
C#
Response.Redirect(Request.RawUrl);



Fore more reference here you go:
asp.net stop button event running on Refresh[^]

--Amit
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900