<%@ Control Language="C#" AutoEventWireup="true" CodeFile="RegControl.ascx.cs" Inherits="MkSun.Ke_System.Control_User_RegControl" %>
<script language="javascript" type="text/javascript">

function getinfo(str)
{
  MkSun.Ke_System.Control_User_RegControl.GetUserinfo(str, Getinfo_callback);	
}
function Getinfo_callback(response)
{
var myspan = document.getElementById("myinfo");

if(response.value==1)
{

  myspan.innerHTML="<font color=red>很遗憾本用户已经存在</font>";
}
else if(response.value==0)
{
myspan.innerHTML="<font color=blue>恭喜您本用户名还没有被注册</font>";
}
else
{
myspan.innerHTML="<font color=blue>请输入用户名</font>";
}
myspan.style.display="";

}
</script>
<table>
    <tr>
        <td style="width: 100px">
            注册名：</td>
        <td > 
            <asp:TextBox ID="txtper_UserName" runat="server"  onblur="getinfo(this.value)" ValidationGroup="UserReg"></asp:TextBox>
            <span id="myinfo" style="display:none">*</span>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtper_UserName"
                ErrorMessage="*" ValidationGroup="UserReg"></asp:RequiredFieldValidator></td>
       
    </tr>
    <tr>
        <td style="width: 100px; height: 21px;">
            密 码：</td>
        <td style="height: 21px">
            <asp:TextBox ID="txtper_Pwd" runat="server" TextMode="Password" ValidationGroup="UserReg"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtper_Pwd"
                ErrorMessage="*" ValidationGroup="UserReg"></asp:RequiredFieldValidator></td>
    </tr>    <tr>
        <td style="width: 100px">
            确认密码：</td>
        <td>
            <asp:TextBox ID="txtreper_Pwd" runat="server" TextMode="Password" ValidationGroup="UserReg"></asp:TextBox>
            <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="txtper_Pwd"
                ControlToValidate="txtreper_Pwd" ErrorMessage="两次密码不一致" ValidationGroup="UserReg"></asp:CompareValidator></td>
    </tr>    <tr>
        <td style="width: 100px">
            性 别：</td>
        <td>
            <asp:RadioButtonList ID="Rdper_Sex" runat="server" RepeatDirection="Horizontal" ValidationGroup="UserReg">
                <asp:ListItem Selected="True">男</asp:ListItem>
                <asp:ListItem>女</asp:ListItem>
            </asp:RadioButtonList></td>
    </tr>    <tr>
        <td style="width: 100px; height: 21px;">
            取回密码问题：</td>
        <td style="height: 21px">
       
            <asp:TextBox ID="txtper_RePass" runat="server" ValidationGroup="UserReg"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtper_RePass"
                ErrorMessage="*" ValidationGroup="UserReg"></asp:RequiredFieldValidator></td>
    </tr>    <tr>
        <td style="width: 100px">
            取回密码问题答案：</td>
        <td>
            <asp:TextBox ID="txtper_RePass_answer" runat="server" ValidationGroup="UserReg"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtper_RePass_answer"
                ErrorMessage="*" ValidationGroup="UserReg"></asp:RequiredFieldValidator></td>
    </tr>    <tr>
        <td style="width: 100px"></td>
        <td>
            <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="确定注册"  ValidationGroup="UserReg"/>
            &nbsp;
            <input id="Reset1" type="reset" value="重新输入" /></td>
    </tr>    <tr>
        <td style="width: 100px"></td>
        <td></td>
    </tr>    <tr>
        <td style="width: 100px"></td>
        <td></td>
    </tr>    <tr>
        <td style="width: 100px"></td>
        <td></td>
    </tr>    <tr>
        <td style="width: 100px"></td>
        <td></td>
    </tr>
</table>
