I have a page [default.aspx] which associated code-behind [default.aspx.cs].
In my default.aspx page I am using the ASP.NET Login Control and want to be able to manage the authentication event myself by doing the following:
<asp:login id="Login1" OnAuthenticate="OnAuthenticate" runat="server">

In the code-behind [default.aspx.cs] I have added the following function within (public partial class Default_aspx : System.Web.UI.Page {...})

Code:
    private void OnAuthenticate(object sender, AuthenticateEventArgs e)
    {
	string sUser = Login1.UserName;
	string sPwrd = Login1.Password;
	PerformCustomerAuthentication(sUser, sPwrd);
    }
However this approach causes me two problems
a) Error 1 'Default_aspx.OnAuthenticate(object, System.Web.UI.WebControls.AuthenticateEventArgs)' is inaccessible due to its protection level
b) Error 2 The name 'Login1' does not exist in the current context

Is there anyway for me to implement it this way or do I have to add the "OnAuthenticate" function within <script> in the default.aspx page directly?

Any help would be greatly appreciated...
Thanks,