 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Register.aspx.cs" Inherits="Register_Register" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>用户注册</title>
    <link href="../StyleSheet.css" rel="stylesheet" type="text/css" />
 <style  type="text/css">
 .td
 {
       text-align:left;
       width:80px;
 }
 </style>
</head>
<body>
    <form id="form1" runat="server">
    <div style="width:600px; margin: 50px 50px 50px 50px;">
    <fieldset>
    <legend><b>用户注册</b></legend>
    <table cellpadding="1" cellspacing="1" width="550px">
    <tr><td  class="td">账号：</td><td  align="left"><asp:TextBox ID="txtUserID" runat="server" CssClass="txt" Width="150px"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
            ControlToValidate="txtUserID" ErrorMessage="账号不能空!"></asp:RequiredFieldValidator>
        </td></tr>
     <tr><td  class="td">密码：</td><td  align="left"><asp:TextBox ID="txtPassword" runat="server" CssClass="txt" Width="150px" TextMode="Password"></asp:TextBox>
         <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
             ControlToValidate="txtPassword" ErrorMessage="密码不能空!"></asp:RequiredFieldValidator>
         </td></tr>
      <tr><td  class="td">重复密码：</td><td  align="left"><asp:TextBox ID="txtRePassword" runat="server" CssClass="txt" Width="150px" TextMode="Password"></asp:TextBox>
          <asp:CompareValidator ID="CompareValidator1" runat="server" 
              ControlToCompare="txtPassword" ControlToValidate="txtRePassword" 
              ErrorMessage="密码不一致！"></asp:CompareValidator>
          </td></tr>
       <tr><td  class="td">姓名：</td><td  align="left"><asp:TextBox ID="txtName" runat="server" CssClass="txt" Width="150px"></asp:TextBox>
           <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
               ControlToValidate="txtName" ErrorMessage="姓名不能空!"></asp:RequiredFieldValidator>
           </td></tr>
        <tr><td  class="td">性别：</td><td  align="left">
            <asp:RadioButtonList ID="rblSex" runat="server" RepeatDirection="Horizontal" 
                            RepeatLayout="Flow">
                <asp:ListItem Value="0" Selected="True">男</asp:ListItem>
                <asp:ListItem Value="1">女</asp:ListItem>
            </asp:RadioButtonList>
        </td></tr>
         <tr><td  class="td">出生日期：</td><td  align="left"><asp:TextBox ID="txtBirthday" runat="server" 
                            CssClass="txt" Width="100px"></asp:TextBox>&nbsp;格式：yyyy-mm-dd<asp:RequiredFieldValidator 
                            ID="RequiredFieldValidator9" runat="server" ControlToValidate="txtBirthday" 
                            ErrorMessage="出生日期不能空！"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                            ControlToValidate="txtBirthday" ErrorMessage="出生日期格式错误！" 
                            ValidationExpression="([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8])))"></asp:RegularExpressionValidator>
                        </td></tr>
          <tr><td  class="td">籍贯：</td><td  align="left"><asp:TextBox ID="txtHometown" runat="server" CssClass="txt" Width="150px"></asp:TextBox>
              <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                  ControlToValidate="txtHometown" ErrorMessage="籍贯不能空!"></asp:RequiredFieldValidator>
              </td></tr>
           <tr><td  class="td">就读院校：</td><td  align="left"><asp:TextBox ID="txtSchool" runat="server" CssClass="txt" Width="150px"></asp:TextBox>
               <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                   ControlToValidate="txtSchool" ErrorMessage="就读院校不能空!"></asp:RequiredFieldValidator>
               </td></tr>
            <tr><td  class="td">专业：</td><td  align="left"><asp:TextBox ID="txtMajor" runat="server" CssClass="txt" Width="150px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                    ControlToValidate="txtMajor" ErrorMessage="专业不能空!"></asp:RequiredFieldValidator>
                </td></tr>
             <tr><td  class="td">学历：</td><td  align="left">
                 <asp:DropDownList ID="drlStudyExprience" runat="server">
                     <asp:ListItem Value="1">大专</asp:ListItem>
                     <asp:ListItem Value="2">本科</asp:ListItem>
                     <asp:ListItem Value="3">硕士</asp:ListItem>
                     <asp:ListItem Value="4">博士</asp:ListItem>
                 </asp:DropDownList>
             </td></tr>
              <tr><td  class="td">毕业时间：</td><td  align="left"><asp:TextBox ID="txtGraduateDate" runat="server" CssClass="txt" Width="100px"></asp:TextBox>
                  格式：yyyy-mm-dd<asp:RequiredFieldValidator 
                            ID="RequiredFieldValidator10" runat="server" ControlToValidate="txtGraduateDate" 
                            ErrorMessage="毕业时间不能空！"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
                            ControlToValidate="txtGraduateDate" ErrorMessage="毕业时间格式错误！" 
                            
                      ValidationExpression="([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8])))"></asp:RegularExpressionValidator>
                        </td></tr>
               <tr><td  class="td">联系电话：</td><td  align="left"><asp:TextBox ID="txtTelephone" runat="server" CssClass="txt"  Width="150px"></asp:TextBox>
                   <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                       ControlToValidate="txtTelephone" ErrorMessage="联系电话不能空!"></asp:RequiredFieldValidator>
                   </td></tr>
                <tr><td  class="td">Email：</td><td  align="left"><asp:TextBox ID="txtEmail" runat="server" CssClass="txt"  Width="150px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" 
                        ControlToValidate="txtEmail" ErrorMessage="Email不能空!"></asp:RequiredFieldValidator>
&nbsp;<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                        ControlToValidate="txtEmail" ErrorMessage="Email格式错误!" 
                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                    </td></tr>
    </table>
        <p style="text-align:right;">
            <asp:Label ID="lblMsg" runat="server" ForeColor="Red"></asp:Label>
            <asp:Button
             ID="btnRegister" runat="server" Text="注 册" CssClass="btn" Width="80px" 
                onclick="btnRegister_Click" /></p>
    </fieldset>
    </div>
    <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
        ShowMessageBox="True" ShowSummary="False" />
    </form>
</body>
</html>
