c# - Why do event handler methods randomly stop working? -


Why an event handler will work one day, and then next day without any code Stop working?

I have participated in this problem many times, but always have to play around and event handler works anyway. Below is an example where it has happened to me today Do you know a quick way to fix this kind of problem?

  & lt; Asp: LinkButton ID = "LinkButton1" runat = "server" OnClick = "LinkButton1_Click" & gt; Link & lt; / Asp: LinkButton & gt;  

I have set a breakpoint on this method and it never hits.

  Secure Zero LinkButton1_Click (Object Sender, EventArgs E) {// snip}  

I have tried to reconstruct the solution, to rebuild all, etc. Is there any insight here?

Edit:

Yes, AutoEventWireup is set to true, no other system / development environment changes were made. I am using .NET 3.5.

If this is a .NET 1.1 application, check to see if your event handler There was a VS.2003 bug, which sometimes used to strip events. If this is a 2.0 application, then I have seen problems with custom controls, which complain about designer interference in event generation in pagename.aspx.designer.cs (or .vb). See your error list and look for any warning where 'generation of designer file fails' is also true for .NET 3.5.


Comments