<%@ Page Language="C#" %>
<%@ Import Namespace="System.Web.Security" %>
<script runat="server">
public void
Login_OnClick(object sender, EventArgs args)
{
if (Membership.ValidateUser(UsernameTextbox.Text,
PasswordTextbox.Text))
FormsAuthentication.RedirectFromLoginPage(UsernameTextbox.Text,
NotPublicCheckBox.Checked);
else
Msg.Text = "Login failed. Please check your
user name and password and try again.";
}
protected void
Page_Load(object sender, EventArgs e)
{
}
</script>
<html>
<head>
<title>Login</title>
</head>
<body bgcolor="white">
<form id="Form1" runat="server">
<table style="width: 427px;
height: 304px;">
<tr>
<td style="width: 221px">
<asp:Label ID="Label1" runat="server" Text="ExForSys Home Page--Login Here" Width="717px" Font-Size="24pt" ForeColor="#E0E0E0" BorderColor="#400000" BackColor="#400040"></asp:Label>
</td>
</tr>
<tr>
<td style="width: 221px"
bgcolor="#ff99ff">
<br />
Username
<asp:Textbox id="UsernameTextbox"
runat="server" />
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ToolTip="User Name
is required."
ErrorMessage="User Name
is required." ValidationGroup="Login1" ControlToValidate="UserNameTextBox">*</asp:RequiredFieldValidator>
<br />
<p> Password
<asp:Textbox id="PasswordTextbox"
runat="server" TextMode="Password" Width="158px" />
</p>
<p>
<asp:CheckBox id="NotPublicCheckBox" runat="server" />
If this is a Public Computer Please check this box<br />
<br />
<asp:Button id="LoginButton" Text="Login" OnClick="Login_OnClick"
runat="server" Width="91px" />
<br />
<br />
<asp:Label id="Msg" ForeColor="maroon" runat="server" />
</p>
</td>
</tr>
</table>
<P>
<BR>
</form>
</body>
</html>