⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 register.aspx

📁 这是我做的第一个网络购书中心asp.net网站!
💻 ASPX
字号:
<%@ Page Language="C#" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true" CodeFile="Register.aspx.cs" Inherits="User_Register" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table id="tabAddMenber" runat="server" align="center" border="0" cellpadding="0"
        cellspacing="0" class="tableBorder" width="95%">
        <tr>
            <td align="left" class="tableHeaderText" colspan="2" height="25">
                添加新会员 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<asp:Label ID="labWarm" runat="server" Text="labWarm" Width="277px" ForeColor="Red"></asp:Label></td>
        </tr>
        <tr>
            <td align="right" style="width: 63px">
                用户名:
            </td>
            <td align="left" style="width: 291px">
                <asp:TextBox ID="txtName" runat="server" MaxLength="50"></asp:TextBox><font color="red">*<asp:RequiredFieldValidator
                    ID="rfvLoginName" runat="server" ControlToValidate="txtName" Font-Size="9pt"
                    Height="1px" Width="117px">会员登录名不能为空</asp:RequiredFieldValidator></font></td>
        </tr>
        <tr>
            <td align="right" style="width: 63px; height: 24px">
                密 码:
            </td>
            <td align="left" style="height: 24px; width: 291px;">
                <asp:TextBox ID="txtPassword" runat="server" MaxLength="50" TextMode="Password" Width="148px"></asp:TextBox><font
                    color="red">*<asp:RequiredFieldValidator ID="rfvPassword" runat="server" ControlToValidate="txtPassword"
                        Font-Size="9pt" Height="1px" Width="117px">密码不能为空</asp:RequiredFieldValidator></font></td>
        </tr>
        <tr>
            <td align="right" style="width: 63px">
                性别:</td>
            <td align="left" style="width: 291px">
                <asp:DropDownList ID="ddlSex" runat="server">
                    <asp:ListItem Selected="True" Value="1">男</asp:ListItem>
                    <asp:ListItem Value="0">女</asp:ListItem>
                </asp:DropDownList></td>
        </tr>
        <tr>
            <td align="right" style="width: 63px">
                <span style="color: #ff0000">真实姓名: </span>
            </td>
            <td align="left" style="color: #ff0000; width: 291px;">
                <asp:TextBox ID="txtTrueName" runat="server" MaxLength="50"></asp:TextBox><font color="red">*<asp:RequiredFieldValidator
                    ID="rfvTrueName" runat="server" ControlToValidate="txtName" Font-Size="9pt" Height="1px"
                    Width="117px">会员真实名不能为空</asp:RequiredFieldValidator></font></td>
        </tr>
        <tr>
            <td align="right" style="width: 63px">
                所在城市:
            </td>
            <td align="left" style="width: 291px">
                <asp:DropDownList ID="ddlCity" runat="server" Font-Size="9pt" Width="127px">
                    <asp:ListItem>北京</asp:ListItem>
                    <asp:ListItem>上海</asp:ListItem>
                    <asp:ListItem>广州</asp:ListItem>
                </asp:DropDownList></td>
        </tr>
        <tr>
            <td align="right" style="width: 63px">
                详细住址:
            </td>
            <td align="left" valign="middle" style="width: 291px">
                <asp:TextBox ID="txtAddress" runat="server" Height="115px" MaxLength="100" TextMode="MultiLine"
                    Width="206px"></asp:TextBox><span style="color: #ff0000">*<asp:RequiredFieldValidator
                        ID="rfvAddress" runat="server" ControlToValidate="txtName" Font-Size="9pt" Height="1px"
                        Width="117px">会员的详细地址有误</asp:RequiredFieldValidator></span></td>
        </tr>
        <tr>
            <td align="right" style="width: 63px">
                邮编:
            </td>
            <td align="left" style="width: 291px">
                <asp:TextBox ID="txtPostCode" runat="server" MaxLength="50"></asp:TextBox><font color="red">*<asp:RegularExpressionValidator
                    ID="revPostCode" runat="server" ControlToValidate="txtPostCode" Font-Size="9pt"
                    ValidationExpression="\d{6}" Width="134px">您的邮编输入有误</asp:RegularExpressionValidator></font></td>
        </tr>
        <tr>
            <td align="right" style="width: 63px">
                电话号码:
            </td>
            <td align="left" style="width: 291px">
                <asp:TextBox ID="txtPhone" runat="server" MaxLength="50"></asp:TextBox><font color="red">*<asp:RegularExpressionValidator
                    ID="revPhone" runat="server" ControlToValidate="txtPhone" Display="Dynamic" ErrorMessage="您输入的电话号码有误"
                    ValidationExpression="(\(\d{3,4}\)|\d{3,4}-)?\d{7,8}$"></asp:RegularExpressionValidator></font></td>
        </tr>
        <tr>
            <td align="right" style="width: 63px; height: 24px">
                e-mail:</td>
            <td align="left" style="height: 24px; width: 291px;">
                <asp:TextBox ID="txtEmail" runat="server" MaxLength="80"></asp:TextBox><font color="red">*</font>
                <asp:RegularExpressionValidator ID="revEmail" runat="server" ControlToValidate="txtEmail"
                    Font-Size="9pt" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                    Width="132px" ErrorMessage="输入的E-mail有误">输入的E-mail有误</asp:RegularExpressionValidator></td>
        </tr>
        <tr>
            <td align="center" colspan="2">
                <br />
                <asp:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" /></td>
        </tr>
    </table>
</asp:Content>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -