Dynamic events

Results 1 to 2 of 2

Thread: Dynamic events

  1. #1
    Join Date
    Dec 1969

    Default Dynamic events

    I am adding imagebuttons at runtime into a table. I am having trouble with the click event. It just doesn&#039;t happen. Maybe someone can help. It is just doing a postback when I click on the imagebutton. <BR><BR>I declared the imagebutton withevents. In the page load routine I make it a new imagebutton and add it to the table. <BR><BR>Protected WithEvents newThumb As System.Web.UI.WebControls.ImageButton<BR><BR>newTh umb = New System.Web.UI.WebControls.ImageButton()<BR><BR>Tha nks in advance.

  2. #2
    Join Date
    Dec 1969

    Default RE: Dynamic events

    try:<BR><BR>Protected WithEvents newThumb As System.Web.UI.WebControls.ImageButton<BR><BR>AddHa ndler newThumb.Click, New System.EventHandler(AddressOf Me.newThumb_Click) <BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts