' 添加附件删除确认 ProtectedSub rptsortimgUp_ItemCreated()Sub rptsortimgUp_ItemCreated(ByVal sender AsObject, ByVal e As RepeaterItemEventArgs) If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then Dim myDeleteButton As ImageButton =CType(e.Item.FindControl("ibnsortimgUpDelete"), ImageButton) myDeleteButton.Attributes.Add("style", "cursor:hand") myDeleteButton.Attributes.Add("onclick", "return confirm('您确定要删除这个附件吗?')") EndIf End Sub'rptsortimgUp_ItemCreated
' 删除附件 ProtectedSub rptsortimgUp_ItemCommand()Sub rptsortimgUp_ItemCommand(ByVal sender AsObject, ByVal e As RepeaterCommandEventArgs) If e.CommandName ="Delete"Then Connect() Dim strID AsString= e.CommandArgument.ToString() FileUP.sortimgUp.Delete(conn, strID) GetsortimgUp() Disconnect() EndIf End Sub'rptsortimgUp_ItemCommand