datalist的删除事件怎样给出删除提醒呢?
大家早上好。我刚在写Datalist的删除事件,写好了,现在怎样使得在删除前给出提示呢?
我是写的Button按钮
<asp:DataList ID="DataList1" runat="server"
CellPadding="4"
OnDeleteCommand="DataList1_DeleteCommand"
ForeColor="#333333" Width="600px"
onitemdatabound="DataList1_ItemDataBound" >
<ItemTemplate>
<table border="0" style="height: 0px; width: 596px;" class="css" cellpadding="0" cellspacing="0">
<tr>
<td rowspan="3" style="width: 55px">
<asp:Image ID="Image1" runat="server" Height="87px" Width="87px" ImageUrl="~/image/dong9.gif" /></td>
<td style="height: 26px; width: 690px;">
标题:<%# DataBinder.Eval(Container.DataItem, "noticeTitle") %></td>
<td align="center" style="height: 26px; width: 266px;">
<asp:Button ID="btnDel" runat="server" Text="删 除" CommandName="delete" CssClass="blueButtonCss" /></td>
</tr>
应该是在DataList1_ItemDataBound这个事件可以写吧?但是我不会,请大家帮忙
------解决方案--------------------HTML code
<asp:Button ID="btnDel " OnClientClick="return confirm('您确定要删除吗?')" runat="server" Text="删 除" CommandName="delete" CssClass="blueButtonCss" />
------解决方案--------------------
<asp:Button ID="btnDel" OnClientClick="return confirm('是否删除?')" runat="server" Text="删 除" CommandName="delete" CssClass="blueButtonCss" />
------解决方案--------------------
在buntton的onclick写,onclick="return confirm('是否确认删除?');
------解决方案--------------------
楼上的几个都是正解啊