I have a page in ASP.NET 2.0. I add a button in design view and the page runs fine.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rajat Kumar
    New Member
    • Dec 2010
    • 1

    I have a page in ASP.NET 2.0. I add a button in design view and the page runs fine.

    I have a page in ASP.NET 2.0. I add a button in design view and the
    page runs fine. I then double-click the button to create the click
    method in the code. Then when I run the page I get the error "error
    BC30506: Handles clause requires a WithEvents variable defined in the
    containing type or one of its base types."

    I have tried deleting the button and re-adding it numerous times with
    different names and every time I get the same error. I have another
    button on the page that works fine. All the info on this error talks
    about if the control is dynamically created, there is nothing that
    talks about if it is created as part of the page design. Does anyone
    know how to fix it?
Working...