Sub that Handles different controls

Discussion in 'ASP .Net Web Controls' started by mianiro, Feb 7, 2007.

  1. mianiro

    mianiro Guest

    I have a sub procedure where I want to handle a link button and an
    image button. I tried just adding the control name and .click at the
    end of the declaration, but I get an error. Can anyone help me out?

    Protected Sub lbCompanyRecord_Click(ByVal sender As Object, ByVal e As
    System.EventArgs) Handles lbCompanyRecord.Click, ibTest.Click
     
    mianiro, Feb 7, 2007
    #1
    1. Advertising

  2. mianiro

    BigJohn Guest

    The easiest way is to create a Private Sub routine and call it from both
    Click event routines. I know there are other ways, but sometimes the easiest
    is best.
     
    BigJohn, Feb 7, 2007
    #2
    1. Advertising

  3. mianiro

    mianiro Guest

    On Feb 7, 3:28 pm, BigJohn <> wrote:
    > The easiest way is to create a Private Sub routine and call it from both
    > Click event routines. I know there are other ways, but sometimes the easiest
    > is best.


    Yeah thanks... that's how I'm going to work around it for now. Just
    one of those qustions that bugs me!! Because I know there is a way to
    do it!!
     
    mianiro, Feb 8, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. eino
    Replies:
    1
    Views:
    435
    =?ISO-8859-15?Q?=22Martin_v=2E_L=F6wis=22?=
    May 8, 2007
  2. Ben
    Replies:
    2
    Views:
    898
  3. Lawrence D'Oliveiro

    Death To Sub-Sub-Sub-Directories!

    Lawrence D'Oliveiro, May 5, 2011, in forum: Java
    Replies:
    92
    Views:
    2,042
    Lawrence D'Oliveiro
    May 20, 2011
  4. Sophie PARISOT

    How to use different asmx in different sub-directories ?

    Sophie PARISOT, Feb 8, 2006, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    192
    Satish
    Feb 13, 2006
  5. Guy
    Replies:
    6
    Views:
    130
    James Willmore
    Dec 8, 2003
Loading...

Share This Page