i have a folder name is Management in my site . It contain two pages ( BlogPost.aspx , Mlogin.aspx).
Mlogin page contain the login Control :
<asp:Login ID="Login1" runat="server" OnAuthenticate="Login1_Authenticate" ></asp:Login></div>
and code in Mlogin.cs file is
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e) { if (this.Login1.UserName.Trim() == "admin" && this.Login1.Password.Trim() == "admin") { // Success, create non-persistent authentication cookie. FormsAuthentication.SetAuthCookie(this.Login1.UserName.Trim(), false); FormsAuthenticationTicket ticket1 = new FormsAuthenticationTicket( 1, // version this.Login1.UserName.Trim(), // get username from the form DateTime.Now, // issue time is now DateTime.Now.AddMinutes(10), // expires in 10 minutes false, // cookie is not persistent &quo ...

Go to the complete details ...