<%@ Page Language="C#" AutoEventWireup="true" CodeFile="register.aspx.cs" Inherits="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>My BBS</title>
    <link href="images/StyleSheet.css" rel="stylesheet" type="text/css" />
    <style>
		*{font-size:13px;}
		body{text-align:center;padding:10px;}
		table{border-collapse:collapse;width:300px;background:#fff;margin-top:100px;border:1px solid #000;}
		th{background:#ffffff;border:1px solid #000;height:25px;}
		td{border:1px solid #999;padding:3px;}
		.total{font-size:8pt;color:red;text-align:left;}
	</style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <table align="center">
			<tr>
				<th colspan="2">注册</th>
			</tr>
			<tr>
				<td width="50" align="right">帐号:</td>
				<td align=left><asp:TextBox ID="userid" runat="server" ValidationGroup="add"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="userid"
                        ErrorMessage="帐号不为空" ValidationGroup="add">*</asp:RequiredFieldValidator></td>
			</tr>
			<tr>
				<td align="right">密码:</td>
				<td align=left><asp:TextBox ID="pass" runat="server" TextMode="Password" ValidationGroup="add"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="pass"
                        ErrorMessage="密码不为空" ValidationGroup="add">*</asp:RequiredFieldValidator></td>
			</tr>
			<tr>
				<td align="right">确认:</td>
				<td align=left><asp:TextBox ID="againPass" runat="server" TextMode="Password" ValidationGroup="add"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="againPass"
                        ErrorMessage="请确认" ValidationGroup="add">*</asp:RequiredFieldValidator>
                    <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="pass"
                        ControlToValidate="againPass" ErrorMessage="密码不一致" ValidationGroup="add">*</asp:CompareValidator></td>
			</tr>
			<tr>
				<td align="right">昵称:</td>
				<td align=left><asp:TextBox ID="nickname" runat="server" ValidationGroup="add"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="nickname"
                        ErrorMessage="昵称不为空" ValidationGroup="add">*</asp:RequiredFieldValidator></td>
			</tr>
			<tr>
				<td align="right">电邮:</td>
				<td align=left><asp:TextBox ID="email" runat="server" ValidationGroup="add"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="email"
                        ErrorMessage="Email不为空" ValidationGroup="add">*</asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="email"
                        ErrorMessage="Emal格式不正确" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="add">*</asp:RegularExpressionValidator></td>
			</tr>
			<tr>
				<td align="right">性别:</td>
				<td align=left><asp:DropDownList ID="sex" runat="server">
                    <asp:ListItem Selected="True">男</asp:ListItem>
                    <asp:ListItem>女</asp:ListItem>
                </asp:DropDownList></td>
			</tr>
			<tr>
				<td align="right">生日:</td>
				<td align=left><asp:TextBox ID="birth" runat="server" Text="2003-07-18"></asp:TextBox></td>
			</tr>
			<tr>
				<td align="right">主页:</td>
				<td align=left><asp:TextBox ID="homeurl" runat="server" Text="http://"></asp:TextBox></td>
			</tr>
			<tr>
				<td colspan="2"  align="center">
                    <asp:Button ID="checkUserid" runat="server" OnClick="checkUserid_Click" Text="检查帐号"
                        Width="60px" />
                    <asp:Button ID="add_reg" runat="server" Text="注册" ValidationGroup="add" OnClick="add_reg_Click" Width="60px" />
                    <asp:Button ID="reset" runat="server" Text="重置" Width="60px" OnClick="reset_Click" />
				</td>
			</tr>
			<tr><td colspan=2 height=10>
                <asp:Label ID="message" runat="server" ForeColor="Red" Visible="False"></asp:Label></td></tr>
			<tr><td colspan=2 align=center>
                <asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="add" CssClass="total" />
            </td></tr>
		</table>
    </div>
    </form>
</body>
</html>
