this.RegisterStartupScript("suggestion", "<script language=javascript>confirm('请确认删除!')</script>");
if()
{
}
else
{
}
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="return confirm('请确认删除!');" CommandArgument='<%# Eval("id") %>' CommandName="drop">删除</asp:LinkButton> </ItemTemplate>在后台页面ItemCommand中执行删除操作
string id = e.CommandArgument.ToString();
string commName = e.CommandName;
//接下来执行删除
谢谢你。终于解决了
<script language=javascript>confirm('请确认删除!')</script>改成:
<script language=javascript>if(!confirm('请确认删除!')){retrun;}</script>
下面的就不用判断了。