Button control _Click event not firing

Discussion in 'ASP .Net' started by Max, Dec 31, 2003.

  1. Max

    Max Guest

    For some reason my button control just stopped working. In debug mode I
    found the _Click event is just not firing. When I click submit, the page
    just refreshes. Any idea what's going on?

    -Max
     
    Max, Dec 31, 2003
    #1
    1. Advertising

  2. Max

    Curt_C [MVP] Guest

    check the InitializeComponent() section..
    I have a problem where my events keep vanishing and that's the result....

    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    www.Darkfalz.com


    "Max" <> wrote in message
    news:f4CIb.163672$...
    > For some reason my button control just stopped working. In debug mode I
    > found the _Click event is just not firing. When I click submit, the page
    > just refreshes. Any idea what's going on?
    >
    > -Max
    >
    >
     
    Curt_C [MVP], Dec 31, 2003
    #2
    1. Advertising

  3. Max

    John Ruiz Guest

    check to make sure you didn't accidentally remove the line:

    this.Button1.Click += new System.EventHandler(this.Button1_Click);

    from your InitializeComponent() function. also - check to make sure you
    didn't change the name of the button while the editor wasn't looking.

    John

    "Max" <> wrote in message
    news:f4CIb.163672$...
    For some reason my button control just stopped working. In debug mode I
    found the _Click event is just not firing. When I click submit, the page
    just refreshes. Any idea what's going on?

    -Max
     
    John Ruiz, Dec 31, 2003
    #3
  4. Max

    Max Guest

    I think that was it... I read something about code disappearing being a
    common bug in VS.NET. Someone said turn off code reformatting to fix this.

    I'm not sure if it was the InitializeComponent sub though... what I think
    what disappeared was the "Handles bSubmit.Click" specifying the button's
    event sub.

    InitializeComponent is currently empty:
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    End Sub

    -Max

    "Curt_C [MVP]" <software_AT_darkfalz.com> wrote
    > check the InitializeComponent() section..
    > I have a problem where my events keep vanishing and that's the result....
    >
     
    Max, Dec 31, 2003
    #4
    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. Wayne MJ

    Aborting a _Click event?

    Wayne MJ, Jul 23, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    385
    Wayne MJ
    Jul 23, 2003
  2. Wayne MJ

    Re: Aborting a _Click event?

    Wayne MJ, Jul 25, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    506
    Wayne MJ
    Jul 29, 2003
  3. ~~~ .NET Ed ~~~
    Replies:
    3
    Views:
    15,093
    nizarbabu
    Sep 8, 2008
  4. csgraham74

    asp:button control not firing event

    csgraham74, Sep 10, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    3,963
    csgraham74
    Sep 10, 2005
  5. GauravGupta
    Replies:
    4
    Views:
    2,109
    Shilpa1234
    Jan 19, 2012
Loading...

Share This Page