<asp:datagrid id="dgrDisplay" runat="server" Width="100%" CssClass="datagridGridStyle" DataKeyField="adminid" CellPadding="3" BackColor="White" BorderWidth="1px" BorderStyle="None" BorderColor="#CCCCCC" ItemStyle-CssClass="selectmenu" AutoGenerateColumns="False" OnCancelCommand="dgrDisplay_CancelCommand" OnEditCommand="dgrDisplay_EditCommand" OnPageIndexChanged="dgrDisplay_PageIndexChanged" OnUpdateCommand="dgrDisplay_UpdateCommand">
<SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#669999"></SelectedItemStyle>
<ItemStyle ForeColor="#000066" CssClass="selectmenu"></ItemStyle>
<HeaderStyle Font-Bold="True" HorizontalAlign="Center" ForeColor="White" BackColor="#006699"></HeaderStyle>
<FooterStyle ForeColor="#000066" BackColor="White"></FooterStyle>
<Columns>
<asp:TemplateColumn HeaderText="序号">
<HeaderStyle Wrap="False" HorizontalAlign="Center" Width="100px" VerticalAlign="Middle"></HeaderStyle>
<ItemStyle Wrap="False" HorizontalAlign="Center" VerticalAlign="Middle" Width="40px"></ItemStyle>
<HeaderTemplate>
序号&nbsp;&nbsp;<input style="WIDTH: 19px; HEIGHT: 20px" onclick="ChooseAll()" type="checkbox" name="CheckBoxAll">全选
</HeaderTemplate>
<ItemTemplate>
<input type='checkbox' style='WIDTH: 19px; HEIGHT: 20px' name='BatchDel' value='<%# DataBinder.Eval(Container, "DataItem.adminid") %>'>
<%# DataBinder.Eval(Container, "DataItem.adminid") %>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="登陆名">
<ItemTemplate>
<asp:Label ID="lbladminname" Text='<%#DataBinder.Eval(Container,"DataItem.adminname")%>' runat="server"></asp:Label>
</ItemTemplate>

<EditItemTemplate>
<asp:TextBox Runat="server" ID='txtadminname' Text='<%#DataBinder.Eval(Container,"DataItem.adminname")%>'>
</asp:TextBox>
</EditItemTemplate>
                                                <ItemStyle Width="170px" />
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="真实姓名">
<ItemTemplate>
<%# DataBinder.Eval(Container, "DataItem.realname")%>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox Runat="server" ID='txtrealname' Text='<%#DataBinder.Eval(Container,"DataItem.realname")%>'>
</asp:TextBox>
</EditItemTemplate>
                                                <ItemStyle Width="170px" />
</asp:TemplateColumn>
<asp:EditCommandColumn UpdateText="保存" CancelText="取消" EditText="编辑"></asp:EditCommandColumn>
<asp:TemplateColumn HeaderText="修改密码">
<ItemTemplate>
<a href='AdminModifyPassword.aspx?id=<%#DataBinder.Eval(Container,"DataItem.adminid")%>'>修改密码</a>
</ItemTemplate>
                                                <ItemStyle Width="170px" />
</asp:TemplateColumn>
</Columns>
<PagerStyle HorizontalAlign="Left" ForeColor="#000066" BackColor="White" Mode="NumericPages"></PagerStyle>
</asp:datagrid>
这是DATAGRID,里面有CHECKBOX,绑定时给他赋予数值ID,做个删除按纽,在它删除事件中后台CS文件
protected void Button2_Click(object sender, EventArgs e)
        {
            //删除
            string goodsid = this.Request.Params["BatchDel"];
            if (!String.IsNullOrEmpty(goodsid))
            {
                int DeleteLight = Y10.BLL.Admin.SystemManager.SystemUserManager_BLL.MutiDelete(goodsid);
                if (DeleteLight > 0)
                {
                    this.lbl_ShowErr.Text = MsgBox.alter("删除成功!");
                    BindData();
                }
                else
                {
                    this.lbl_ShowErr.Text = MsgBox.alter("删除失败!");
                }
            }
            else
            {
                this.lbl_ShowErr.Text = MsgBox.alter("请先选择要删除信息前面的复选框!");
            }        }