asp.net给按钮添加删除确认
if (!IsPostBack) { BtnDel.Attributes["onclick"] = "javascript:return window.confirm('你确定要删除该条数据吗?')"; }
<td vAlign="bottom" style="width: 75px"> <asp:ImageButton ID="BtnDel" runat="server" ImageUrl="../images/an_sc.gif" OnClick="BtnDel_Click"/></td>