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. General Programming
  3. Visual Basic
  4. How to trap usercontrol click event in aspx page

How to trap usercontrol click event in aspx page

Scheduled Pinned Locked Moved Visual Basic
csharpcsstutorial
2 Posts 2 Posters 1 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.
  • N Offline
    N Offline
    Nathan Buckley
    wrote on last edited by
    #1

    Hi, I have a created a user control (pagination for grid) in my application. It has four Imagebuttons. I need to trap the click event of these imagebutton outside of the user control and only in my aspx page. I am currently working on .Net 2.0. Please show me the way, Thanks,

    R 1 Reply Last reply
    0
    • N Nathan Buckley

      Hi, I have a created a user control (pagination for grid) in my application. It has four Imagebuttons. I need to trap the click event of these imagebutton outside of the user control and only in my aspx page. I am currently working on .Net 2.0. Please show me the way, Thanks,

      R Offline
      R Offline
      Rana Muhammad Javed Khan
      wrote on last edited by
      #2

      You will have declare an event and raise it in the event which you want to capture e.g. if you have a button in your user control then you capture its click event as: 'Declare it in Declaration Section Public Event MyButtonClicked() 'In the click event of button you will have to write this: Private Sub cmdTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdTest.Click RaiseEvent MyButtonClicked() End Sub MyButtonClicked() event will be available in aspx form and you can handle it. hope you will get it if you face any problem let me know. take care Javed

      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