前端代码:
<asp:LinkButton ID="delLinkButton" runat="server" OnClientClick='return confirm("确定删除?")'
CommandName="del" CommandArgument='<%# Eval("ID") %>'>删 除</asp:LinkButton>
后端代码:
protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
{
if (e.CommandName == "del")
{
//删除的方法
}
}