Results 1 to 15 of 15

Thread: ImageButton Control - OnCommand

Threaded View

  1. #1

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    ImageButton Control - OnCommand

    I am adding an ImageButton control to my ASPX page dynamically in code (VB.NET) by adding it to the controls collection of a PlaceHolder control. However, "OnCommand" is not listed in the properties of that control. I need to set this to specify the name of the procedure which will act as the event handler when this control is clicked on.

    Does anyone know how I set it?

    Here is my code so far:
    VB Code:
    1. ibPOD = New ImageButton
    2. ibPOD.ImageUrl = "View.ico"
    3. ibPOD.CommandName = "ViewJob"
    4. ibPOD.CommandArgument = e.Item.DataItem("pk_Job_in")
    5. ibPOD.ToolTip = "View Job"
    There is no "OnCommand" property...
    Last edited by simonm; May 16th, 2005 at 05:09 AM.
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

Posting Permissions

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



Click Here to Expand Forum to Full Width