When declaring a code method as private (for example, an event handler), the compiler ignores it and produces:
"Compiler error message: CS1061:" ASP.default_aspx "does not contain a definition for" OnLoginUser ", and the extension method" OnLoginUser "cannot be found that accepts the first argument of type" ASP.default_aspx "(you do not see using the directive or link to assembly?) "
In practice, OnLoginUsed exists, and when the identifier is changed to "public \ protected", everything works fine.
The question is, why is it impossible to declare such a method private? after all, it is called internally by other members of the class.
10x!
source
share