From 1f3e8a80d62194b01c1431379129df746186e86b Mon Sep 17 00:00:00 2001 From: Polyhymnia <2281017491@qq.com> Date: Wed, 9 Jun 2021 22:21:12 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20=E5=AE=8B=E5=98=89?= =?UTF-8?q?=E7=82=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\345\256\213\345\230\211\347\202\234/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "\347\254\2542\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/.keep" diff --git "a/\347\254\2542\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/.keep" "b/\347\254\2542\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From 6126266fd83daae0f3e4f3a8dd80f2f00155fd8d Mon Sep 17 00:00:00 2001 From: Polyhymnia <2281017491@qq.com> Date: Wed, 9 Jun 2021 22:21:27 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=AE=8B=E5=98=89=E7=82=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WebForm1.aspx" | 52 ++++++++++++++ .../WebForm1.aspx.cs" | 72 +++++++++++++++++++ 2 files changed, 124 insertions(+) create mode 100644 "\347\254\2542\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm1.aspx" create mode 100644 "\347\254\2542\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm1.aspx.cs" diff --git "a/\347\254\2542\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm1.aspx" "b/\347\254\2542\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm1.aspx" new file mode 100644 index 0000000..5061eae --- /dev/null +++ "b/\347\254\2542\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm1.aspx" @@ -0,0 +1,52 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="PersonMessage.WebForm1" %> + + + + + + + + + + +
+
+

注册页面

+
+ 姓名: +
+ 密码: +
+ 性别: + + + +
+ 爱好: + 打篮球 + 跳舞 + 唱歌 + 敲代码 + +
+ 省份: +
+ 市区: +
+ 其他信息: +
+ 上传头像: +
+ +
+ + + +
+
+ + diff --git "a/\347\254\2542\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm1.aspx.cs" "b/\347\254\2542\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm1.aspx.cs" new file mode 100644 index 0000000..73192ba --- /dev/null +++ "b/\347\254\2542\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm1.aspx.cs" @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace PersonMessage +{ + public partial class WebForm1 : System.Web.UI.Page + { + protected void Page_Init(object sender,EventArgs e) + { + if (!IsPostBack) + { + Province.Items.Add("福建"); + Province.Items.Add("山东"); + Province.Items.Add("江西"); + Downtown.Items.Add("龙岩"); + Downtown.Items.Add("厦门"); + Downtown.Items.Add("泉州"); + } + } + protected void Page_Load(object sender, EventArgs e) + { + if (Province.SelectedItem.Text == "福建") + { + Downtown.Items.Add("龙岩"); + Downtown.Items.Add("厦门"); + Downtown.Items.Add("泉州"); + } + else if (Province.SelectedItem.Text == "山东") + { + Downtown.Items.Add("潍坊"); + Downtown.Items.Add("临沂"); + Downtown.Items.Add("菏泽"); + } + else + { + Downtown.Items.Add("南昌"); + Downtown.Items.Add("九江"); + Downtown.Items.Add("鄱阳"); + } + } + + protected void TextBox1_TextChanged(object sender, EventArgs e) + { + + } + + protected void Upload_Click(object sender, EventArgs e) + { + string habbits = "爱好有"; + for (int i = 0; i < Habbits.Items.Count; i++) + { + if (Habbits.Items[i].Selected) + { + habbits += Habbits.Items[i].Text + " "; + } + } + Literal1.Text = $"姓名:{Name.Text} ,性别:{Gender.Text},来自{Province.Text}{Downtown.Text}市,{habbits},其他信息{TextBox1.Text}"; + + if (FileUpload1.HasFile) + { + string fileName = FileUpload1.FileName; + FileUpload1.SaveAs(fileName); + GetImage.ImageUrl = "/img/"+fileName; + GetImage.Visible = true; + } + } + } +} \ No newline at end of file -- Gitee From 44946dd78e8fd86f438d74594865527631ac9bd4 Mon Sep 17 00:00:00 2001 From: Polyhymnia <2281017491@qq.com> Date: Mon, 14 Jun 2021 19:32:28 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20=E5=AE=8B=E5=98=89?= =?UTF-8?q?=E7=82=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\345\256\213\345\230\211\347\202\234/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/.keep" diff --git "a/\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/.keep" "b/\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From 23f1161dbe7c5c0dcd5f8d6d0585d219ada213aa Mon Sep 17 00:00:00 2001 From: Polyhymnia <2281017491@qq.com> Date: Mon, 14 Jun 2021 19:32:43 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=AE=8B=E5=98=89=E7=82=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WebForm1.aspx" | 75 +++++++++++++++++++ .../WebForm1.aspx.cs" | 30 ++++++++ .../WebForm2.aspx" | 32 ++++++++ .../WebForm2.aspx.cs" | 69 +++++++++++++++++ .../WebForm3.aspx" | 17 +++++ .../WebForm3.aspx.cs" | 22 ++++++ 6 files changed, 245 insertions(+) create mode 100644 "\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm1.aspx" create mode 100644 "\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm1.aspx.cs" create mode 100644 "\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm2.aspx" create mode 100644 "\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm2.aspx.cs" create mode 100644 "\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm3.aspx" create mode 100644 "\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm3.aspx.cs" diff --git "a/\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm1.aspx" "b/\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm1.aspx" new file mode 100644 index 0000000..6a9af16 --- /dev/null +++ "b/\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm1.aspx" @@ -0,0 +1,75 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="验证注册页面.WebForm1" %> + + + + + + + + + +
+
+ <%--姓名:必填,且不能为admin + + 密码:必填 + + 再次输入密码:必须一致 + + 年龄:0~100 + + 出生日期:格式正确,范围1900-01-01到2021-07-01 + + 毕业时间:格式正确,不能早于出生日期 + + 邮箱:格式正确 + + 提交 + + 错误汇总:单段,弹框。--%> +

注册页面

+ 姓名: + + +
+ + 密码: + + +
+ + 重复密码: + + +
+ 年龄: + + +
+ + 出生日期: + + +
+ + 毕业日期: + +
+ 邮箱: + + +
+ +
+ + + +
+ + +
+ + +
+ + diff --git "a/\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm1.aspx.cs" "b/\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm1.aspx.cs" new file mode 100644 index 0000000..f5658ae --- /dev/null +++ "b/\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm1.aspx.cs" @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace 验证注册页面 +{ + public partial class WebForm1 : System.Web.UI.Page + { + + protected void Page_Load(object sender, EventArgs e) + { + BirthRange.MaximumValue = System.DateTime.Now.ToShortDateString(); + } + + + + protected void Button1_Click(object sender, EventArgs e) + { + if (Page.IsValid==true) + { + Success.Text = "注册成功"; + } + } + + + } +} \ No newline at end of file diff --git "a/\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm2.aspx" "b/\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm2.aspx" new file mode 100644 index 0000000..ba7fab4 --- /dev/null +++ "b/\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm2.aspx" @@ -0,0 +1,32 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="验证注册页面.WebForm2" %> + + + + + + + + + +
+
+

登录

+ 账号(用户名): + + + + +
+ 密码: + + + + +
+ + + +
+
+ + diff --git "a/\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm2.aspx.cs" "b/\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm2.aspx.cs" new file mode 100644 index 0000000..879a48a --- /dev/null +++ "b/\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm2.aspx.cs" @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace 验证注册页面 +{ + public partial class WebForm2 : System.Web.UI.Page + { + static string Username; + + static string Password; + protected void Page_Load(object sender, EventArgs e) + { + + if (PreviousPage != null) + { + Username = Request.Form["Name"]; + Password = Request.Form["Password"]; + } + } + + protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args) + { + if (Loading.Text.Equals(Username) || Username != null) + { + args.IsValid = false; + } + else + { + args.IsValid = true; + } + } + + protected void LoadingHas_ServerValidate(object source, ServerValidateEventArgs args) + { + if (Loading.Text.Equals(Username) || Username != null) + { + args.IsValid = false; + } + else + { + args.IsValid = true; + } + } + + protected void PasswordCustom_ServerValidate(object source, ServerValidateEventArgs args) + { + if (Password1.Text.Equals(Password) || Password != null) + { + args.IsValid = false; + } + else + { + args.IsValid = true; + } + } + + protected void CustomValidator2_ServerValidate(object source, ServerValidateEventArgs args) + { + if (args.Value =="admin") + { + CustomValidator2.IsValid = true; + } + } + } +} \ No newline at end of file diff --git "a/\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm3.aspx" "b/\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm3.aspx" new file mode 100644 index 0000000..f92e2ef --- /dev/null +++ "b/\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm3.aspx" @@ -0,0 +1,17 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm3.aspx.cs" Inherits="验证注册页面.WebForm3" %> + + + + + + + + + +
+
+ +
+
+ + diff --git "a/\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm3.aspx.cs" "b/\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm3.aspx.cs" new file mode 100644 index 0000000..21126c4 --- /dev/null +++ "b/\347\254\2543\346\254\241\344\275\234\344\270\232/\345\256\213\345\230\211\347\202\234/WebForm3.aspx.cs" @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace 验证注册页面 +{ + public partial class WebForm3 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + if (PreviousPage != null) + { + TextBox tb = (TextBox)PreviousPage.FindControl("Loading"); + ; + Literal1.Text = "欢迎" + tb.Text; + } + } + } +} \ No newline at end of file -- Gitee