repeat帮定删除按钮事件,并且生成去人删除提示

时间:2023-04-13 08:19:02

前台

<ItemTemplate>
<tr>
<td>
<asp:LinkButton ID="LinkButton_cancel" OnClientClick="javascript:if(!confirm('确定取消吗?'))return false;" runat="server" CommandName="cancel" CommandArgument='<%#Eval("BidSNo") %>'>取消</asp:LinkButton>
</td>
</tr>
</ItemTemplate>

后台

 if (e.CommandName == "cancel")
{
string bidSNo = e.CommandArgument.ToString();
string str = ((TextBox)e.Item.FindControl("Button_cancel")).Text;
//逻辑 }