Clicking on an ImageButton in a DataList raises the DataLists ItemCommand event.
Try something like this:
Protected Sub DataList1_ItemCommand(ByVal sourceAs Object,ByVal eAs System.Web.UI.WebControls.DataListCommandEventArgs)Handles DataList1.ItemCommandIf TypeOf e.CommandSourceIs ImageButtonThen Dim thisImgButtonAs ImageButton =DirectCast(e.CommandSource, ImageButton)Dim altTextAs String = thisImgButton.AlternateTextEnd IfEnd Sub
No comments:
Post a Comment