U
UGH
I am adding image buttons dynamically and I need to add event handler when
the user clicks on one of those image buttons which will have different id
for reports.
Here is my code
LnkImage = New ImageButton()
LnkImage.ImageUrl = "~/printer.gif"
LnkImage.ID = "ib" & oArray(1, id)
AddHandler LnkImage.Command, AddressOf NewIbnCommandEvent()
cellItem.Controls.Add(LnkImage)
here is the handler
Private Sub NewIbnCommandEvent(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs)
' Will do something here
Reponse.redirect(""~/appt.aspx?appt_id=" & LnkImage.ID")
End Sub
But I get this error message. Argument not specified for parameter 'e' of
'Private Sub NewIbnCommandEvent(sender As Object, e As
System.Web.UI.ImageClickEventArgs)'.
I do not know what to put in between the () AddHandler LnkImage.Command,
AddressOf NewIbnCommandEvent()
Thanks for any help.
the user clicks on one of those image buttons which will have different id
for reports.
Here is my code
LnkImage = New ImageButton()
LnkImage.ImageUrl = "~/printer.gif"
LnkImage.ID = "ib" & oArray(1, id)
AddHandler LnkImage.Command, AddressOf NewIbnCommandEvent()
cellItem.Controls.Add(LnkImage)
here is the handler
Private Sub NewIbnCommandEvent(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs)
' Will do something here
Reponse.redirect(""~/appt.aspx?appt_id=" & LnkImage.ID")
End Sub
But I get this error message. Argument not specified for parameter 'e' of
'Private Sub NewIbnCommandEvent(sender As Object, e As
System.Web.UI.ImageClickEventArgs)'.
I do not know what to put in between the () AddHandler LnkImage.Command,
AddressOf NewIbnCommandEvent()
Thanks for any help.