AddUser.aspx
上传用户:gooyliu
上传日期:2018-09-29
资源大小:5816k
文件大小:7k
源码类别:

.net编程

开发平台:

C#

  1. <%@ Page Language="C#" MasterPageFile="~/SysAdmin/sysAdminMasterPage.Master" AutoEventWireup="true" CodeBehind="AddUser.aspx.cs" Inherits="Web.SysAdmin.AddUser" Title="添加用户" %>
  2. <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
  3.      <div>
  4.         <table cellspacing="0" style="font-size: 12px; font-family: Tahoma; border-collapse: collapse;
  5.             width: 300px;" bgcolor="#f1f0f4" bordercolor="#2c6ed5" cellpadding="0" align="left"
  6.             border="1">
  7.             <tr>
  8.                 <td align="center" height="40" colspan="2">
  9.                     <font size="4"><b>添加用户信息</b></font><br />
  10.                     <font color="red">加*号为必填项目</font>
  11.                 </td>
  12.             </tr>
  13.             <tr height="35">
  14.                 <td>
  15.                     用户编号:
  16.                 </td>
  17.                 <td style="width: 273px">
  18.                     <asp:TextBox ID="txtUserID" runat="server" Width="150px"></asp:TextBox><font face="宋体">*<asp:RequiredFieldValidator
  19.                         ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtUserID" ErrorMessage="该项不能为空"></asp:RequiredFieldValidator>
  20.                     </font>
  21.                 </td>
  22.             </tr>
  23.             <tr height="35">
  24.                 <td>
  25.                     初始密码:
  26.                 </td>
  27.                 <td style="width: 273px">
  28.                     <asp:TextBox ID="txtPassword" runat="server" TextMode="Password" Width="150px"></asp:TextBox><font
  29.                         face="宋体">*<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
  30.                             ControlToValidate="txtPassword" ErrorMessage="该项不能为空"></asp:RequiredFieldValidator></font>
  31.                 </td>
  32.             </tr>
  33.             <tr height="35">
  34.                 <td>
  35.                     确认密码:
  36.                 </td>
  37.                 <td style="width: 273px">
  38.                     <asp:TextBox ID="txtConfirmPwd" runat="server" TextMode="Password" Width="150px"></asp:TextBox><font
  39.                         face="宋体">*
  40.                         <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="txtPassword"
  41.                             ControlToValidate="txtConfirmPwd" ErrorMessage="与密码不一致" ></asp:CompareValidator></font>
  42.                 </td>
  43.             </tr>
  44.             <tr height="35">
  45.                 <td style="height: 23px">
  46.                     用户类型:
  47.                 </td>
  48.                 <td style="height: 23px; width: 273px;">
  49.                     <asp:DropDownList ID="ddlUserRole" runat="server" DataSourceID="SqlDataSource1" DataTextField="roleName"
  50.                         DataValueField="roleID" AutoPostBack="false">
  51.                     </asp:DropDownList>
  52.                     <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
  53.                         SelectCommand="SELECT * FROM [Role]"></asp:SqlDataSource>
  54.                     *
  55.                 </td>
  56.             </tr>
  57.             <tr height="35">
  58.                 <td style="height: 23px">
  59.                     姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名:
  60.                 </td>
  61.                 <td style="height: 23px; width: 273px;">
  62.                     <asp:TextBox ID="txtUserName" runat="server" Width="150px"></asp:TextBox><font face="宋体">*<asp:RequiredFieldValidator
  63.                         ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtUserName" ErrorMessage="该项不能为空"></asp:RequiredFieldValidator></font>
  64.                 </td>
  65.             </tr>
  66.             <tr height="35">
  67.                 <td>
  68.                     性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别:
  69.                 </td>
  70.                 <td style="width: 273px">
  71.                     <asp:RadioButtonList ID="rblUserSex" runat="server" RepeatDirection="Horizontal">
  72.                         <asp:ListItem Selected="True" Value="true">男</asp:ListItem>
  73.                         <asp:ListItem Value="false">女</asp:ListItem>
  74.                     </asp:RadioButtonList>
  75.                 </td>
  76.             </tr>
  77.             <tr>
  78.                 <td>
  79.                     出生时间:
  80.                 </td>
  81.                 <td>
  82.                     <asp:DropDownList ID="ddlYear" runat="server">
  83.                     </asp:DropDownList>
  84.                     年
  85.                     <asp:DropDownList ID="ddlMonth" runat="server">
  86.                     </asp:DropDownList>
  87.                     月
  88.                     <asp:DropDownList ID="ddlDay" runat="server">
  89.                     </asp:DropDownList>
  90.                     日
  91.                 </td>
  92.             </tr>
  93.             <tr height="35">
  94.                 <td style="height: 25px">
  95.                     所在单位:
  96.                 </td>
  97.                 <td style="width: 273px; height: 25px;">
  98.                     <asp:TextBox ID="txtUserDepart" runat="server" Width="150px"></asp:TextBox><font
  99.                         face="宋体">*<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"
  100.                             ControlToValidate="txtUserDepart" ErrorMessage="该项不能为空"></asp:RequiredFieldValidator></font>
  101.                 </td>
  102.             </tr>
  103.             <tr>
  104.                 <td>
  105.                     电&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;话:
  106.                 </td>
  107.                 <td style="width: 273px">
  108.                     <asp:TextBox ID="txtUserTelephone" runat="server" Width="150px"></asp:TextBox><font
  109.                         face="宋体">*<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server"
  110.                             ControlToValidate="txtUserTelephone" ErrorMessage="该项不能为空"></asp:RequiredFieldValidator></font>
  111.                 </td>
  112.             </tr>
  113.             <tr height="35">
  114.                 <td style="height: 25px">
  115.                     用户住址:
  116.                 </td>
  117.                 <td style="height: 25px; width: 273px;">
  118.                     <asp:TextBox ID="txtUserAddress" runat="server" Width="150px"></asp:TextBox><font
  119.                         face="宋体">*<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
  120.                             ControlToValidate="txtUserAddress" ErrorMessage="该项不能为空"></asp:RequiredFieldValidator></font>
  121.                 </td>
  122.             </tr>
  123.             <tr height="35">
  124.                 <td align="center" colspan="2">
  125.                     <font face="宋体">
  126.                         <asp:Label ID="lblMessage" runat="server" ForeColor="Red"></asp:Label><br />
  127.                         <asp:ImageButton ID="imgBtnAdd" runat="server" ImageUrl="~/Images/ADD.GIF" OnClick="imgBtnAdd_Click" />&nbsp;&nbsp;
  128.                         &nbsp;
  129.                         <asp:ImageButton ID="imgBtnReset" runat="server" 
  130.                         ImageUrl="~/Images/RESET.GIF" CausesValidation="False" 
  131.                         onclick="imgBtnReset_Click" /></font>
  132.                 </td>
  133.             </tr>
  134.         </table>
  135.     </div>
  136. </asp:Content>