前台
<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; //逻辑 }
时间: 2024-10-10 06:50:35