您的位置:首页 > 其它

其实repeater的ItemCreated和ItemCommand事件也蛮好用的。

2005-11-07 23:54 525 查看
<asp:repeater id="rptsortimgUp" runat="server" OnItemCommand="rptsortimgUp_ItemCommand" OnItemCreated="rptsortimgUp_ItemCreated">
<itemtemplate>
<a href='<%# DataBinder.Eval(Container, "DataItem.f_url") %>' target="_blank"><img width="16" height="16" hspace="3"
<asp:ImageButton ID="ibnsortimgUpDelete" ImageUrl="/Images/icon_delete.gif" Width="13" Height="13" ImageAlign="AbsMiddle" CommandName="Delete" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.f_id") %>' causesvalidation="False" runat="server">
</asp:ImageButton>
</itemtemplate>
<separatortemplate>
|
</separatortemplate>
</asp:repeater>

' 添加附件删除确认
' 删除附件
Protected Sub rptsortimgUp_ItemCommand()Sub rptsortimgUp_ItemCommand(ByVal sender As Object, ByVal e As RepeaterCommandEventArgs)
If e.CommandName = "Delete" Then
Connect()
Dim strID As String = e.CommandArgument.ToString()
FileUP.sortimgUp.Delete(conn, strID)
GetsortimgUp()
Disconnect()
End If
End Sub 'rptsortimgUp_ItemCommand
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐