“ASP.demanage_aspx”并不包含“GridView1_RowDeleting”的定义
<asp:Label ID="Label7" runat="server" Height="24px" Style="z-index: 108; left: 155px;position: absolute; top: 130px" Text="部门编号:" Width="83px"></asp:Label>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" OnRowDeleting="GridView1_RowDeleting" DataKeyNames = "did"
AutoGenerateColumns="False" BackColor="White" BorderColor="#CC9966" BorderStyle="None"
BorderWidth="1px" CellPadding="4" DataSourceID="SqlDataSource1"
Height="242px" PageSize="8" Style="z-index: 109; left: 147px; position: absolute;
top: 153px" Width="530px" >
<FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
<Columns>
<asp:BoundField DataField="did" HeaderText="编号" ReadOnly="True" SortExpression="did" />
<asp:BoundField DataField="dname" HeaderText="名称" SortExpression="dname" />
<asp:BoundField DataField="dnum" HeaderText="人数" SortExpression="dnum" />
<asp:CommandField ShowEditButton="True" />
<asp:CommandField ShowDeleteButton="True" />
</Columns>
<RowStyle BackColor="White" ForeColor="#330099" />
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
<PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:kqConnectionString %>"
SelectCommand="SELECT [did], [dname], [dnum] FROM [dep]" DeleteCommand="DELETE FROM [dep] WHERE [did] = @did" InsertCommand="INSERT INTO [dep] ([did], [dname], [dnum]) VALUES (@did, @dname, @dnum)" UpdateCommand="UPDATE [dep] SET [dname] = @dname, [dnum] = @dnum WHERE [did] = @did">
</asp:SqlDataSource>