<%@ Page Language="VB" %>
<%@ Import Namespace="System.Web.Security" %>
<script runat="server">
Public Sub Login_OnClick(sender As Object, args As EventArgs)
If (Membership.ValidateUser(UsernameTextbox.Text, PasswordTextbox.Text)) Then
FormsAuthentication.RedirectFromLoginPage(UsernameTextbox.Text, NotPublicCheckBox.Checked)
Else
Msg.Text = "Login failed. Please check your user name and password and try again."
End If
End Sub
</script>
<html>
<head>
<title>Login</title>
</head>
<body>
<form runat="server">
<h3>Login</h3>
<asp:Label id="Msg" ForeColor="maroon" runat="server" /><P>
Username: <asp:Textbox id="UsernameTextbox" runat="server" /><BR>
Password: <asp:Textbox id="PasswordTextbox" runat="server" TextMode="Password" /><BR>
<asp:Button id="LoginButton" Text="Login" OnClick="Login_OnClick" runat="server" />
<asp:CheckBox id="NotPublicCheckBox" runat="server" /> Check here if this is <u>not</u> a public computer.
</form>
</body>
</html>