日期:2014-05-19  浏览次数:20465 次

在repeater中怎样弹出对话框
<asp:repeater>
....
<asp:LinkButton   id= "LinkButton2 "   runat= "server "   CommandName= "bb "   CommandArgument= ' <%#databinder.eval(container.dataitem, "ID ")%> '> 删除 </asp:LinkButton>
...
</asp:repeater>
怎样   当点击   删除   弹出对话框啊

------解决方案--------------------
Dim myDeleteButton As LinkButton
myDeleteButton = e.Item.FindControl( "LinkButton2 ")
myDeleteButton.Text = "删除 "
myDeleteButton.Attributes.Add( "onclick ", "return confirm( '您真的要删除第 "_
+ e.Item.ItemIndex.ToString + " 行吗? '); ")

-------
LinkButton myDeleteButton = e.Item.FindControl( "LinkButton2 ");
myDeleteButton.Text = "删除 ";
myDeleteButton.Attributes.Add( "onclick ", "return confirm( '您真的要删除第 "_
+ e.Item.ItemIndex.ToString + " 行吗? '); ");