title: Visual Studio 2008 ASP.NET Website error: Handles clause requires a WithEvents variable defined in the containing type or one of its base type
body: <p>I'm new to the job and trying to get accustomed to VB.NET and Visual Studio 2008. I came from VS 2015 - 2017 and C#. </p>
  
  <p>I downloaded a project from Subversion Source Control and I tried to run it. I get this weird error that reads: "Handles clause requires a WithEvents variable defined in the containing type or one of its base type". I tried several solutions around the web and SO without avail. I tried solutions from <a href="https://stackoverflow.com/questions/7674574/handles-clause-requires-a-withevents-variable-defined-in-the-containing-type-or">here</a>, <a href="https://stackoverflow.com/questions/37780240/visual-basic-login-page-causing-an-error-error-bc30506-handles-clause-requires">here</a> and <a href="https://forums.asp.net/t/1147454.aspx?BC30506%20Handles%20clause%20requires%20a%20WithEvents%20variable%20defined%20in%20the%20containing%20type%20or%20one%20of%20its%20base%20types%20" rel="nofollow noreferrer">here</a> without any luck. Some of the solutions has to do with the aspx.designer.vb file but unlike projects, VS 2008 ASP.NET websites doesn't have these type of files. I tried to re-create the button and the code behind with no luck. The error persists and the error only refers to one button in particular. Others buttons in the same page are working fine.</p>
  
  <p>How I'm supposed to fix this? Please! Thank you!</p>