This is 'my' code for the login.aspx.cs file. It sets the cookie that remembers the User. Just add a checkbox to the login.aspx page and check it's value before setting the cookie.
Code:
private void Submit_Click(object sender, System.EventArgs e)
{
SkiPrincipal newUser = SkiPrincipal.ValidateLogin( EmailAddress.Text.Trim(), Password.Text.Trim() );
if (newUser == null)
{
LoginResult.Text = "Login failed for " + EmailAddress.Text;
LoginResult.Visible = true;
}
else
{
Context.User = newUser;
if(chkRememberMe.Checked)
{
FormsAuthentication.SetAuthCookie( EmailAddress.Text, true );
}
Response.Redirect("/ThePhileCS/default.aspx");
}
}