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

.net编程

开发平台:

C#

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