www.bitwix.com

Bitwix


Software

Snippets

Forms Authentication

Default.aspx

protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
        lbluserName.Text = User.Identity.Name;
}
protected void LogoutClick(object sender, EventArgs e)
{
    FormsAuthentication.SignOut();
    Response.Redirect("Default.aspx");
}

Login.aspx

protected void LogonClick(object sender, EventArgs e)
{
    if (txtUserName.Text == "ajc")
        FormsAuthentication.RedirectFromLoginPage("ajc", false);
}

Web.Config

[system.web]
 [authorization]
  [deny users="?"/]
 [/authorization]
 [authentication mode="Forms" /]


Whitespace

Property Hawk

Projects

This layout has been adapted from an original design by Ruthsarian Layouts, downloaded from oswd.org