Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. imagebtn

imagebtn

Scheduled Pinned Locked Moved ASP.NET
questionhelpsysadmin
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    terjk
    wrote on last edited by
    #1

    I have an event calendar. If there is an event for a particular day, an icon will show. (Now that the imagebutton is created programatically). The problem is when i create it, how can i do the event handling? img.navigateurl? (imgbtn does not have the property of navigateurl) What is the way create the link handler? Dim img As ImageButton = New ImageButton img.ResolveUrl("Error.aspx")-----> resolveurl cant be used. img.ImageUrl = Server.MapPath("Pics\pencil.gif") urgent urgent!!!!

    J 1 Reply Last reply
    0
    • T terjk

      I have an event calendar. If there is an event for a particular day, an icon will show. (Now that the imagebutton is created programatically). The problem is when i create it, how can i do the event handling? img.navigateurl? (imgbtn does not have the property of navigateurl) What is the way create the link handler? Dim img As ImageButton = New ImageButton img.ResolveUrl("Error.aspx")-----> resolveurl cant be used. img.ImageUrl = Server.MapPath("Pics\pencil.gif") urgent urgent!!!!

      J Offline
      J Offline
      John Kuhn
      wrote on last edited by
      #2

      Like so:

      ' details omitted...
      Dim ib As New ImageButton
      AddHandler ib.Click, AddressOf ImageClickHandler
      End Sub

      Private Sub ImageClickHandler(ByVal sender As Object, ByVal e As ImageClickEventArgs)
      ' Do Something
      End Sub

      What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups