No 29 · 使用Wizard Web 控件制作导航页
来源:互联网 发布:数据库的开发 编辑:程序博客网 时间:2024/05/20 14:28
<%@ Page Language="C#" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>用户注册</title></head><body style="font-size: 9pt"> <form id="form1" runat="server"> <div> </div> <asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="3" BackColor="White" BorderStyle="Ridge" HeaderText="用户注册" Width="490px" Height="201px" OnNextButtonClick="Wizard1_NextButtonClick"> <StepStyle BackColor="White" HorizontalAlign="Center" VerticalAlign="Middle" /> <SideBarStyle BackColor="#C0C0FF" BorderStyle="Solid" Width="100px" /> <WizardSteps> <asp:WizardStep runat="server" Title="新用户注册 " ID="sep1"> <br /> <table style="font-size: 9pt"> <tr> <td colspan="3" style="width: 257px" > <asp:TextBox ID="TextBox1" runat="server" Width="348px">为了更好的管理和维护网站,请您自觉遵守以下条款:</asp:TextBox> </td> </tr> <tr> <td colspan="3" style="width: 257px"> <asp:TextBox ID="TextBox2" runat="server" Width="354px">(一)不得利用本网站进行商业广告宣传;</asp:TextBox> </td> </tr> <tr> <td colspan="3" style="width: 257px; height: 17px;"> <asp:TextBox ID="TextBox3" runat="server" Width="355px">(二)不得利用本网站发送非法文章;</asp:TextBox> </td> </tr> <tr> <td colspan="3" style="width: 257px; height: 21px"> <asp:TextBox ID="TextBox4" runat="server" Width="353px">(三)不得利用本网站进行上传非法图片;</asp:TextBox> </td> </tr> <tr> <td colspan="3" style="width: 257px; height: 17px;"> <asp:TextBox ID="TextBox5" runat="server" Width="350px">(四)互相尊重,对自己的言论和行为负责;</asp:TextBox> </td> </tr> <tr> <td colspan="3" rowspan="3" style="width: 257px; height: 54px"> <asp:TextBox ID="TextBox7" runat="server" Height="44px" Rows="10" TextMode="MultiLine" Width="350px">(五)普通用户欲删除文章、评论、图片等信息,请与管理员联系。</asp:TextBox> </td> </tr> <tr> </tr> <tr> </tr> <tr> <td colspan="3" rowspan="1" style="width: 257px; height: 12px"> <asp:CheckBox ID="CheckBox1" runat="server" Text="接受以上协议" /> <asp:CheckBox ID="CheckBox2" runat="server" Text="不接受以上协议" /> </td> </tr> <tr> <td colspan="3" rowspan="1" style="width: 257px; height: 12px"> <asp:Literal ID="Literal1" runat="server"></asp:Literal> </td> </tr> </table> </asp:WizardStep> <asp:WizardStep runat="server" Title="基本情况" ID="sep2"> <div class="black14" > <b style="font-size: 16px">个人信息(<font class="org14">*</font>为必填项)</b></div> <div class="greyLineH" style="margin: 3px 0px"> <table > <tr> <td style="width: 9px; height: 26px" > *</td> <td style="height: 26px" > <asp:Label ID="Label1" runat="server" Text="用户姓名:"></asp:Label> </td> <td style="width: 154px; height: 26px" > <asp:TextBox ID="TextBox8" runat="server" Width="149px"></asp:TextBox> </td> </tr> <tr> <td style="width: 9px; height: 28px" > *</td> <td style="height: 28px" > <asp:Label ID="Label2" runat="server" Text="用户密码:"></asp:Label> </td> <td style="width: 154px; height: 28px" > <asp:TextBox ID="TextBox9" runat="server" TextMode="Password" Width="145px"></asp:TextBox> </td> </tr> <tr> <td style="width: 9px; height: 26px" > *</td> <td style="height: 26px" > <asp:Label ID="Label3" runat="server" Text="用户性别:"></asp:Label> </td> <td style="width: 154px; height: 26px"> <asp:DropDownList ID="DropDownList3" runat="server" Width="152px"> <asp:ListItem>请选择</asp:ListItem> <asp:ListItem>男</asp:ListItem> <asp:ListItem>女</asp:ListItem> </asp:DropDownList> </td> </tr> <tr> <td style="width: 9px" > *</td> <td > <asp:Label ID="Label4" runat="server" Text="用户邮箱:"></asp:Label> </td> <td style="width: 154px" > <asp:TextBox ID="TextBox10" runat="server"></asp:TextBox> </td> </tr> <tr> <td style="width: 9px" > *</td> <td > <asp:Label ID="Label5" runat="server" Text="身份证号:"></asp:Label> </td> <td style="width: 154px" > <asp:TextBox ID="TextBox11" runat="server"></asp:TextBox> </td> </tr> <tr> <td style="width: 9px; height: 24px;" > *</td> <td style="height: 24px" > <asp:Label ID="Label6" runat="server" Text="用户年龄:"></asp:Label> </td> <td style="width: 154px; height: 24px;"> <asp:TextBox ID="TextBox12" runat="server"></asp:TextBox> </td> </tr> <tr> <td colspan="3" style="height: 14px"> <asp:Literal ID="Literal2" runat="server"></asp:Literal> </td> </tr> </table> </div> </asp:WizardStep> <asp:WizardStep runat="server" Title="教育与工作" ID="sep3"> <div class="black14" style="margin-left: 15px"> <b>最高学历教育背景(<font class="org14">*</font>为必填项)<br /> <br /> <table style="width: 243px"> <tr> <td style="width: 48px"> <asp:Label ID="Label7" runat="server" Text="* 时间 :" Width="105px"></asp:Label> </td> <td colspan="2"> <asp:TextBox ID="TextBox13" runat="server"></asp:TextBox> </td> </tr> <tr> <td style="width: 48px; height: 21px"> <asp:Label ID="Label8" runat="server" Text="* 学校名称:" Width="115px"></asp:Label> </td> <td colspan="2" style="height: 21px"> <asp:TextBox ID="TextBox14" runat="server"></asp:TextBox> </td> </tr> <tr> <td style="width: 48px"> <asp:Label ID="Label9" runat="server" Text="* 专业名称:" Width="105px"></asp:Label> </td> <td colspan="2"> <asp:TextBox ID="TextBox15" runat="server"></asp:TextBox> </td> </tr> <tr> <td style="width: 48px; height: 24px;"> <asp:Label ID="Label10" runat="server" Text="*学历/学位:" Width="111px"></asp:Label> </td> <td colspan="2" style="height: 24px"> <asp:DropDownList ID="DropDownList1" runat="server" Width="118px"> <asp:ListItem>请选择</asp:ListItem> <asp:ListItem>初中</asp:ListItem> <asp:ListItem>高中</asp:ListItem> <asp:ListItem>中专</asp:ListItem> <asp:ListItem>中技</asp:ListItem> <asp:ListItem>大专</asp:ListItem> <asp:ListItem>本科</asp:ListItem> <asp:ListItem>硕士</asp:ListItem> <asp:ListItem>MBAN </asp:ListItem> <asp:ListItem>EMBA</asp:ListItem> <asp:ListItem>博士</asp:ListItem> <asp:ListItem>其他</asp:ListItem> </asp:DropDownList> </td> </tr> <tr> <td colspan="3"> <asp:Literal ID="Literal3" runat="server"></asp:Literal> </td> </tr> </table> </b></div> </asp:WizardStep> <asp:WizardStep runat="server" Title="求职意向" StepType="Finish" ID="sep4"> <div class="black14" style="margin-left: 15px"> <b style="font-size: 16px"> <div class="black14" style="margin-left: 15px"> <b style="font-size: 16px">求职意向<br /> <br /> <table> <tr> <td style="width: 34px; height: 26px;"> <asp:Label ID="Label11" runat="server" Text="* 期望工作性质:" Width="156px"></asp:Label> </td> <td style="height: 26px"> <asp:TextBox ID="TextBox16" runat="server" Width="247px"></asp:TextBox> </td> </tr> <tr> <td style="width: 34px; height: 21px"> <asp:Label ID="Label12" runat="server" Text="* 期望工作地区:" Width="161px"></asp:Label> </td> <td style="height: 21px"> <asp:TextBox ID="TextBox17" runat="server" Width="247px"></asp:TextBox> </td> </tr> <tr> <td style="width: 34px; height: 22px"> <asp:Label ID="Label13" runat="server" Text="* 期望从事职业:" Width="157px"></asp:Label> </td> <td style="height: 22px"> <asp:TextBox ID="TextBox18" runat="server" Width="247px"></asp:TextBox> </td> </tr> <tr> <td style="width: 34px; height: 21px"> <asp:Label ID="Label14" runat="server" Text="* 期望从事行业:" Width="156px"></asp:Label> </td> <td style="height: 21px"> <asp:TextBox ID="TextBox19" runat="server" Width="247px"></asp:TextBox> </td> </tr> <tr> <td style="width: 34px; height: 21px"> <asp:Label ID="Label15" runat="server" Text="* 期望月薪(税前):" Width="161px"></asp:Label> </td> <td style="height: 21px"> <asp:DropDownList ID="DropDownList2" runat="server"> <asp:ListItem>请选择</asp:ListItem> <asp:ListItem>1000元/月以下</asp:ListItem> <asp:ListItem>1000-2000元/月</asp:ListItem> <asp:ListItem>2001-4000元/月</asp:ListItem> <asp:ListItem>4001-6000元/月</asp:ListItem> <asp:ListItem>6001-8000元/月</asp:ListItem> <asp:ListItem>8001-10000元/月</asp:ListItem> <asp:ListItem>10001-15000元/月</asp:ListItem> <asp:ListItem>15000-25000元/月</asp:ListItem> <asp:ListItem>25000元/月以上</asp:ListItem> <asp:ListItem>保密<</asp:ListItem> </asp:DropDownList> </td> </tr> <tr> <td colspan="2" rowspan="5"> <asp:RadioButtonList ID="RadioButtonList1" runat="server" BorderStyle="Dashed" Font-Size="9pt" Width="439px"> <asp:ListItem Value="r1">我目前处于离职状态,可立即上岗</asp:ListItem> <asp:ListItem Value="r2">我目前在职,正考虑换个新环境(如有合适的工作机会,到岗时间一个月左右)</asp:ListItem> <asp:ListItem Value="r3">我对现有工作还算满意,如有更好的工作机会,我也可以考虑。(到岗时间另议)</asp:ListItem> <asp:ListItem Value="r4">应届毕业生</asp:ListItem> <asp:ListItem Value="r5">目前暂无跳槽打算</asp:ListItem> </asp:RadioButtonList> </td> </tr> <tr> </tr> <tr> </tr> <tr> </tr> <tr> </tr> <tr> <td colspan="2" rowspan="1"> <asp:Literal ID="Literal4" runat="server"></asp:Literal> </td> </tr> </table> <br /> </b> </div> </b> </div> </asp:WizardStep> <asp:WizardStep runat="server" Title="完成" StepType="Complete" ID="sep5"> <div class="myzhaopinMenuTitle2"> 恭喜您,简历填写成功!</div> </asp:WizardStep> </WizardSteps> <SideBarButtonStyle BackColor="#C0C0FF" BorderColor="White" BorderStyle="None" Width="100px" /> <HeaderStyle BackColor="White" BorderStyle="Groove" Font-Size="Smaller" HorizontalAlign="Center" VerticalAlign="Middle" Font-Names="Arial" /> </asp:Wizard> </form></body></html>using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;public partial class _Default : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Wizard1.ActiveStepIndex = 0; Wizard1.StepPreviousButtonText = "回上一步重填"; Wizard1.StepNextButtonText = "信息正确"; } } protected void Wizard1_NextButtonClick(object sender, WizardNavigationEventArgs e) { if (Wizard1.ActiveStepIndex == Wizard1.WizardSteps.IndexOf(this.sep1)) { if (CheckBox1.Checked == false) { //Response.Write("<script>window.alert('请正确填写个人信息')</script>"); this.Literal1.Text = "请选择是否同意本站协议"; e.Cancel = true; } else { this.Literal1.Text = ""; } } if (Wizard1.ActiveStepIndex == Wizard1.WizardSteps.IndexOf(this.sep2)) { if (TextBox9.Text == "" || TextBox10.Text == "" || TextBox11.Text == "" || TextBox8.Text == "" || TextBox12.Text == "") { //Response.Write("<script>window.alert('请正确填写个人信息')</script>"); this.Literal2.Text = "请正确填写个人信息"; e.Cancel = true; } else { this.Literal2.Text = ""; } } if (Wizard1.ActiveStepIndex == Wizard1.WizardSteps.IndexOf(this.sep3)) { if (TextBox13.Text == "" || TextBox14.Text == "" || TextBox15.Text == "") { //Response.Write("<script>window.alert('请正确填写个人信息')</script>"); this.Literal3.Text = "请正确填写教育信息"; e.Cancel = true; } else { this.Literal3.Text = ""; } } if (Wizard1.ActiveStepIndex == Wizard1.WizardSteps.IndexOf(this.sep4)) { if (TextBox16.Text == "" || TextBox17.Text == "" || TextBox18.Text == "" || DropDownList2.SelectedIndex == 0) { //Response.Write("<script>window.alert('请正确填写个人信息')</script>"); this.Literal4.Text = "请正确填写求职信息"; e.Cancel = true; } else { this.Literal4.Text = ""; } } }}