<%@ Register TagPrefix="Title" TagName="TitleShow" Src="/aspnetdata/Title.ascx" %>
<html>
  <script language="c#" runat=server>
	void Login_Click(object sender,EventArgs e){
		if(UserID.Value=="john" && UserPass.Value=="john"){
			Session["Login_OK"]=-1;
			Response.Redirect("Download.aspx");
		}
		else{
			Msg.Text = "验证错误，请再试一次";
		}
	}
  </script>
<body background="/aspnetdata/images/winback.gif">
<Title:TitleShow id="BookT" Runat="server" />
    <form runat=server>
      <table>
        <tr>
          <td>输入ID:</td>
          <td><input id="UserID" type="text" runat=server/>(范例ID及密码均为john)</td>
          <td><ASP:RequiredFieldValidator ControlToValidate="UserID" Display="Static" ErrorMessage="请输入ID" runat=server/></td>
        </tr>
        <tr>	
          <td>输入密码:</td>
          <td><input id="UserPass" type=password runat=server/></td>
          <td><ASP:RequiredFieldValidator ControlToValidate="UserPass" Display="Static" ErrorMessage="请输入密码" runat=server/></td>
        </tr>
      </table>
      <asp:button text="登陆" OnClick="Login_Click" runat=server/>
      <p>
      <asp:Label id="Msg" ForeColor="red" Font-Name="Verdana" Font-Size="10" runat=server />
    </form>
  </body>

</html>

