代碼如下:
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")
{
//刪除的方法
}
更多信息請查看IT技術(shù)專欄