Double Click a button doesn't create event handler

Last post 06-18-2009 5:12 AM by inutan@gmail.com. 5 replies.

Sort Posts:

  • Double Click a button doesn't create event handler

    06-17-2009, 12:36 PM
    • Member
      171 point Member
    • inutan@gmail.com
    • Member since 05-19-2008, 2:57 AM
    • Reading, U.K.
    • Posts 92

    Hello there,

    I have Vista Home Premium installed on my computer and working with Visual Studio 2005.

    We all know that double clicking a control creates the associated default event handler for that control in the code behind. 

    But, in my case I have these button controls on my web form, and I am not able to generate event handler when double click them.

    Can anyone suggest what is going wrong here?

    Thanks in advance!

    Dream Big!
  • Re: Double Click a button doesn't create event handler

    06-17-2009, 12:52 PM
    Answer
    • Member
      208 point Member
    • SilverSwan
    • Member since 09-28-2006, 7:35 PM
    • The Netherlands
    • Posts 39

    You could also set them by going to the properties of the button and then selecting the little thunder bolt. There you can also set the events.

    My guess is there is something wrong with your codebehind file.

  • Re: Double Click a button doesn't create event handler

    06-17-2009, 1:03 PM
    • Participant
      1,572 point Participant
    • RemithR
    • Member since 01-19-2009, 7:46 PM
    • Posts 274
    Could you please provide some sample code, how you are handling the double click event for those button?? This would help us to come up with a solution easier.
  • Re: Double Click a button doesn't create event handler

    06-17-2009, 1:12 PM
    • Star
      14,074 point Star
    • karan@dotnet
    • Member since 09-13-2007, 8:15 PM
    • New York
    • Posts 2,441

    Well does that happens for all of your controls?

    Try creating another site and see if that happens. Also try closing visual studio and try that again.

    Thanks,
    Karan

    ~ Remember To Mark The Post(s) That Helped You As The ANSWER ~
  • Re: Double Click a button doesn't create event handler

    06-17-2009, 1:15 PM
    • Member
      171 point Member
    • inutan@gmail.com
    • Member since 05-19-2008, 2:57 AM
    • Reading, U.K.
    • Posts 92

    Hello SilverSwan,

    I did try the Events tab in Properties window, but even from there I was not able to create event handlers Sad

    Anyways, you are right that there is something wrong with my webpage or code-behind.
    I tried same by adding another web page and copying over the controls... and it seems fine Smile

    Thanks for your help!

    Dream Big!
  • Re: Double Click a button doesn't create event handler

    06-18-2009, 5:12 AM
    • Member
      171 point Member
    • inutan@gmail.com
    • Member since 05-19-2008, 2:57 AM
    • Reading, U.K.
    • Posts 92

    Well, I was able to figure out the issue with my previous web page.

    The reason why I was not able to create event handler after double clicking my control was that -

    the namespace mentioned in 'Inherits' attribute of <%@ Page...> directive was not matching with the one in my code behind.

    Cheers! 

    Dream Big!
Page 1 of 1 (6 items)