无为清净楼资源网 Design By www.qnjia.com
1.
复制代码 代码如下:
<asp:ListView ID="lvBalance" runat="server" >
<LayoutTemplate>
<div id="listDiv" style="width:100%;overflow-y:auto;">
<table border=0 cellpadding=0 cellspacing=0 style="float:left;table-layout:fixed;" class="datagrid-body easydatagrid">
<asp:PlaceHolder id=itemPlaceholder runat=server/>
</table>
<div id="div999" style='display: none; width: 200px;' class="div2"></div>
</div>
</LayoutTemplate>
<ItemTemplate>
<tr><td>
<asp:LinkButton ID="lb_delete" runat="server" CommandArgument='<%#Eval("ItemCode")%>' OnClientClick="return confirm('确定删除此条信息?');" onclick="lb_delete_Click" Text="删除"></asp:LinkButton>
<</td>/tr>
</ItemTemplate>
</asp:ListView>

2.
复制代码 代码如下:
protected void lb_delete_Click(object sender, EventArgs e)
{
LinkButton lbdelete = (LinkButton)sender;
BLLAccount bll_updateBalance = new BLLAccount();
if (hd_vehiclecode.Value != "" && lbdelete.CommandArgument != "")
{
if (bll_updateBalance.deleteBalance(hd_vehiclecode.Value, lbdelete.CommandArgument) == true)
{
this.ClientScript.RegisterStartupScript(this.GetType(), this.Title, "alert('删除成功!');", true);
Datebind();
}
else
{
this.ClientScript.RegisterStartupScript(this.GetType(), this.Title, "alert('删除失败!');", true);
}
}
}
标签:
listview,button,事件

无为清净楼资源网 Design By www.qnjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
无为清净楼资源网 Design By www.qnjia.com