Home > Codes >

confirmation for delete button in gridview control using c#

Chinnibr
Posted by Chinnibr under ASP.NET category on | Views : 5008
In HTML page ,for gridview button column tag add this code


 <asp:TemplateField ShowHeader="False">

<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete"
OnClientClick='return confirm("Are you sure you want to delete this entry?");'
Text="Delete" />
</ItemTemplate>
</asp:TemplateField>

Comments or Responses

Login to post response