Adding Event Handler

Discussion in 'ASP .Net Web Services' started by Trecius, Apr 2, 2009.

  1. Trecius

    Trecius Guest

    Hello, Newsgroupians:

    I am starting to learn ASP .NET, and I'm using Visual Studio 2005. I am
    following a book as my guide. However, I'm having some problems
    automatically creating methods for my event handlers.

    To start, it tells me to create a new "Web Form" by going to File --> New
    --> File... --> Web Form. This creates a file for me called Default1.aspx.
    In the design mode, I drag a button control onto the whiteboard, or document,
    and try to proceed to add the button's click event handler.

    I click the button; I view the properties window. In the properties
    windows, I click the events button, which is the lightning bolt. I try to
    double-click the "Click" event, but it just switches me to the "source view."
    So I go back to the properties window and -- this time -- I type in the name
    of the handler for the click event. This time, Visual Studio adds the
    attribute "OnClick" to the definition of my button; however, it does not
    populate the <script> section with the method. Any ideas why it doesn't work?

    I've also tried selecting the button from the drop-down menus at the top of
    the source view and then selecting the Click button. I get no results; it
    doesn't add the method.

    Thank you.


    Trecius
     
    Trecius, Apr 2, 2009
    #1
    1. Advertising

  2. Trecius

    JM Guest

    > I click the button; I view the properties window. In the properties
    > windows, I click the events button, which is the lightning bolt. I try to
    > double-click the "Click" event, but it just switches me to the "source
    > view."


    Double click on the button instead.

    John
     
    JM, Apr 3, 2009
    #2
    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. =?Utf-8?B?QW5kcmV3IFdpZWQ=?=

    Adding event handler for dynamically created controls

    =?Utf-8?B?QW5kcmV3IFdpZWQ=?=, Apr 19, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    1,423
    =?Utf-8?B?QmlsbCBCb3Jn?=
    Apr 25, 2004
  2. Laurent Bugnion
    Replies:
    1
    Views:
    10,134
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Jan 21, 2006
  3. Nathan Sokalski
    Replies:
    8
    Views:
    4,652
    Raymond
    Mar 1, 2006
  4. Replies:
    1
    Views:
    756
    Damien
    Feb 22, 2007
  5. Nathan Sokalski
    Replies:
    1
    Views:
    362
    Mark Rae [MVP]
    Nov 1, 2007
Loading...

Share This Page