HI, I am looking a snippet to warn the user before processing with deletion and my ViewEmployees.aspx page.. I am using a Gridview with autogenerated insert, delete statements; how would I do this on my Code Behind File?
<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" CellPadding="4"
DataKeyNames="EmployeeID" DataSourceID="AccessDataSource1" ForeColor="#333333"
GridLines="None">
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<Columns>
<asp:BoundField DataField="EmployeeNumber" HeaderText="Employee Number"
SortExpression="EmployeeNumber" />
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
<asp:BoundField DataField="Position" HeaderText="Position"
SortExpression="Position" />
<asp:BoundField DataField="EmployeeSince" HeaderText="Employee Since"
SortExpression="EmployeeSince" />
<asp:BoundField DataField="BusinessUnit" HeaderText="Business Unit"
SortExpression="BusinessUnit" />
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True"
ShowSelectButton="True" />
</Columns>
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#999999" />
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
</asp:GridView>
Code Behind
Protected Sub GridView1_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GridView1.RowDeleting
'Delete Warning
End Sub