接[1]
用户报名提交数据页面 index.aspx
用户报名页面,用了CuteEditor控件,对各个字段进行数据验证,有一个图片上传功能
<%@ Register TagPrefix="ce" Namespace="CuteEditor" Assembly="CuteEditor" %>
<%@ Page language="c#" Codebehind="Index.aspx.cs" AutoEventWireup="false" Inherits="SignUp.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Incsun网上报名</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<table width="80%" border="1" style="BORDER-COLLAPSE: collapse" bordercolor="#0000ff" align="center">
<tr>
<td colspan="2" align="center" bgcolor="#3366ff"><font color="#ffff66" size="5" style="FONT-WEIGHT: bold; COLOR: yellow; FONT-FAMILY: 黑体; BACKGROUND-COLOR: #3366ff">网上报名</font></td>
</tr>
<tr>
<td align="right" width="120"> <FONT face="宋体">赛区:</FONT>
</td>
<td>
<asp:TextBox id="Txtsq" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator2" runat="server" ControlToValidate="Txtsq" ErrorMessage="[必填]"
Display="Static" Width="361px"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right" width="120"> <FONT face="宋体">姓名:</FONT>
</td>
<td>
<asp:TextBox id="Txtxm" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator id="Requiredfieldvalidator1" runat="server" ControlToValidate="Txtxm" ErrorMessage="[必填]"
Display="Static" Width="361px"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right" width="120"> <FONT face="宋体">年龄:</FONT></td>
<td>
<asp:TextBox id="Txtage" runat="server" MaxLength="2"></asp:TextBox><FONT face="宋体">岁</FONT>
<asp:RequiredFieldValidator id="Requiredfieldvalidator3" runat="server" ControlToValidate="Txtage" ErrorMessage="[必填]"
Display="Static" Width="361px"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right" width="120"> <FONT face="宋体">性别:</FONT></td>
<td style="HEIGHT: 22px">
<asp:DropDownList id="Txtsex" runat="server" Width="56px">
<asp:ListItem></asp:ListItem>
<asp:ListItem Value="男">男</asp:ListItem>
<asp:ListItem Value="女">女</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator id="Requiredfieldvalidator10" runat="server" ControlToValidate="Txtsex" ErrorMessage="[必填]"
Display="Static" Width="151px"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right" width="120"> <FONT face="宋体">照片上传:</FONT></td>
<td><INPUT type="file" runat="server" id="upImage" name="File1" style="WIDTH: 432px; HEIGHT: 22px">
<asp:RequiredFieldValidator id="Requiredfieldvalidator11" runat="server" ControlToValidate="upImage" ErrorMessage="[必填]"
Display="Static" Width="144px"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right" width="120"> <FONT face="宋体">通讯地址:</FONT></td>
<td>
<asp:TextBox id="Txtaddress" runat="server" Width="430px"></asp:TextBox>
<asp:RequiredFieldValidator id="Requiredfieldvalidator4" runat="server" ControlToValidate="Txtaddress" ErrorMessage="[必填]"
Display="Static" Width="151px"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right" width="120"> <FONT face="宋体">邮编:</FONT></td>
<td>
<asp:TextBox id="Txtzip" runat="server" Width="144px"></asp:TextBox>
<asp:RequiredFieldValidator id="Requiredfieldvalidator5" runat="server" ControlToValidate="Txtzip" ErrorMessage="[必填]"
Display="Static" Width="48px"></asp:RequiredFieldValidator><asp:regularexpressionvalidator id="RegularExpressionValidator1" runat="server" Font-Size="11" Font-Name="Arial"
Display="Static" ControlToValidate="Txtzip" ValidationExpression="^/d{6}$"> 邮政编码必须是 6 位数字</asp:regularexpressionvalidator>
</td>
</tr>
<tr>
<td align="right" width="120"> <FONT face="宋体">通讯方式:</FONT></td>
<td>
<P>
<asp:TextBox id="Txtlx" runat="server" Width="432px"></asp:TextBox>
<asp:RequiredFieldValidator id="Requiredfieldvalidator6" runat="server" ControlToValidate="Txtlx" ErrorMessage="[必填]"
Display="Static" Width="153px"></asp:RequiredFieldValidator>
</P>
</td>
</tr>
<tr>
<td align="right" width="120"><FONT face="宋体">个人简历:</FONT></td>
<td style="HEIGHT: 194px">
<CE:Editor id="Txtjl" runat="server" Height="225px" AutoConfigure="Minimal" Width="100%" ShowHtmlMode="False"
ShowPreviewMode="False" ShowCodeViewToolBar="False">
<FrameStyle Height="100%" BorderWidth="1px" BorderStyle="Solid" BorderColor="#DDDDDD" Width="100%"
CssClass="CuteEditorFrame" BackColor="White"></FrameStyle>
</CE:Editor>
<asp:RequiredFieldValidator id="Requiredfieldvalidator7" runat="server" ControlToValidate="Txtjl" ErrorMessage="[必填]"
Display="Static" Width="361px"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right" width="120"> <FONT face="宋体">个人特长:</FONT></td>
<td style="HEIGHT: 233px">
<ce:Editor id="Txttc" runat="server" Height="208px" AutoConfigure="Minimal" Width="100%" ShowHtmlMode="False"
ShowPreviewMode="False">
<FrameStyle Height="100%" BorderWidth="1px" BorderStyle="Solid" BorderColor="#DDDDDD" Width="100%"
CssClass="CuteEditorFrame" BackColor="White"></FrameStyle>
</ce:Editor>
<asp:RequiredFieldValidator id="Requiredfieldvalidator8" runat="server" ControlToValidate="Txttc" ErrorMessage