Grid View delete field got error

Jan 17 2018 1:50 AM
'GridView1_RowDeleting' is not a member of 'ASP.viewuser_aspx'.
 
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="id" OnPageIndexChanging="GridView1_PageIndexChanging" OnRowDeleting="GridView1_RowDeleting" BorderWidth="2px" marginspace="5" CssClass="grid2 table table-striped table-bordered table-hover" BorderColor="Salmon" ItemStyle-Width="50" CellSpacing="6" CellPadding="6">
<Columns>
<asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True" SortExpression="id" />
<asp:BoundField DataField="name" HeaderText="name" SortExpression="name" />
<asp:BoundField DataField="username" HeaderText="username" SortExpression="username" />
<asp:BoundField DataField="email" HeaderText="email" SortExpression="email" />
<asp:BoundField DataField="password" HeaderText="password" SortExpression="password" />
<asp:BoundField DataField="phone" HeaderText="phone" SortExpression="phone" />
<asp:BoundField DataField="date_added" HeaderText="date_added" SortExpression="date_added" />
<asp:CommandField ShowDeleteButton="true" />
</Columns>
<EditRowStyle BackColor="#2461BF" />
<FooterStyle BackColor="red" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="red" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#EFF3FB" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#F5F7FB" />
<SortedAscendingHeaderStyle BackColor="#6D95E1" />
<SortedDescendingCellStyle BackColor="#E9EBEF" />
<SortedDescendingHeaderStyle BackColor="#4870BE" />
</asp:GridView>

Answers (2)