Moving button click event from protected accessor to public-Collection of common programming errors
Why is this so?
Because when you remove the protected
access modifier and you do not specify any other modifier, private
is assumed, and click handlers cannot be private. They must at least be protected because ASP.NET generates at runtime a class that derives from the page you have defined and it needs to be able to call its base methods.