From fed1f3cb79374471bbcfac20eff9f1af10dad084 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E4=BC=9F=E6=9D=B0?= <2997495035@qq.com> Date: Wed, 25 May 2022 14:43:00 +0000 Subject: [PATCH 1/5] =?UTF-8?q?=E6=96=B0=E5=BB=BA=2031=E9=99=88=E4=BC=9F?= =?UTF-8?q?=E6=9D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "31\351\231\210\344\274\237\346\235\260/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "31\351\231\210\344\274\237\346\235\260/.keep" diff --git "a/31\351\231\210\344\274\237\346\235\260/.keep" "b/31\351\231\210\344\274\237\346\235\260/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From 848099edd3ccda1e822580ed2484f994267838bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E4=BC=9F=E6=9D=B0?= <2997495035@qq.com> Date: Wed, 25 May 2022 14:43:37 +0000 Subject: [PATCH 2/5] =?UTF-8?q?=E6=96=B0=E5=BB=BA=202022-5-25?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "31\351\231\210\344\274\237\346\235\260/2022-5-25/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "31\351\231\210\344\274\237\346\235\260/2022-5-25/.keep" diff --git "a/31\351\231\210\344\274\237\346\235\260/2022-5-25/.keep" "b/31\351\231\210\344\274\237\346\235\260/2022-5-25/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From 0a55c7d939a0ce1988c60ee1fdfcd50198c20b11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E4=BC=9F=E6=9D=B0?= <2997495035@qq.com> Date: Wed, 25 May 2022 14:52:05 +0000 Subject: [PATCH 3/5] 31 --- .../2022-5-25/WebForm3.aspx.cs" | 30 +++++++++++ .../2022-5-25/WebForm4.aspx" | 42 +++++++++++++++ .../2022-5-25/WebForm4.aspx.cs" | 53 +++++++++++++++++++ 3 files changed, 125 insertions(+) create mode 100644 "31\351\231\210\344\274\237\346\235\260/2022-5-25/WebForm3.aspx.cs" create mode 100644 "31\351\231\210\344\274\237\346\235\260/2022-5-25/WebForm4.aspx" create mode 100644 "31\351\231\210\344\274\237\346\235\260/2022-5-25/WebForm4.aspx.cs" diff --git "a/31\351\231\210\344\274\237\346\235\260/2022-5-25/WebForm3.aspx.cs" "b/31\351\231\210\344\274\237\346\235\260/2022-5-25/WebForm3.aspx.cs" new file mode 100644 index 0000000..a0a2590 --- /dev/null +++ "b/31\351\231\210\344\274\237\346\235\260/2022-5-25/WebForm3.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 WebApplication2 +{ + public partial class WebForm3 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + Response.Write($"请求方式:{Request.RequestType}"); + if (Request.RequestType == "POST") + { + string a = Request.Params["name"]; + string b = Request.Params["mima"]; + Response.Write($"

欢迎你,{a},你的密码是:{b}

"); + } + else + { + string c = Request.Params["name2"]; + string d = Request.Params["mima2"]; + Response.Write($"

欢迎你,{c},你的密码是:{d}

"); + } + + } + } +} \ No newline at end of file diff --git "a/31\351\231\210\344\274\237\346\235\260/2022-5-25/WebForm4.aspx" "b/31\351\231\210\344\274\237\346\235\260/2022-5-25/WebForm4.aspx" new file mode 100644 index 0000000..b447f8f --- /dev/null +++ "b/31\351\231\210\344\274\237\346\235\260/2022-5-25/WebForm4.aspx" @@ -0,0 +1,42 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm4.aspx.cs" Inherits="WebApplication2.WebForm4" %> + + + + + + + + + +
+
+ + + + + + + + + + + + + +
+ 用户名: + + +
+ 密码: + + +
+ + + +
+
+
+ + diff --git "a/31\351\231\210\344\274\237\346\235\260/2022-5-25/WebForm4.aspx.cs" "b/31\351\231\210\344\274\237\346\235\260/2022-5-25/WebForm4.aspx.cs" new file mode 100644 index 0000000..271f0f3 --- /dev/null +++ "b/31\351\231\210\344\274\237\346\235\260/2022-5-25/WebForm4.aspx.cs" @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace WebApplication2 +{ + public partial class WebForm4 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + protected void Button1_Click(object sender, EventArgs e) + { + if (name.Text == "cwj") + { + if (mima.Text == "123456") + { + Button1.PostBackUrl = "~/WebForm2.aspx"; + } + else + { + Response.Write(""); + } + } + else + { + Response.Write(""); + } + } + protected void Button2_Click(object sender, EventArgs e) + { + if (name.Text == "cwj") + { + if (mima.Text == "123456") + { + Response.Redirect("WebForm2.aspx?name=" + name.Text + "&pwd=" + name.Text); + } + else + { + Response.Write(""); + } + } + else + { + Response.Write(""); + } + } + } +} \ No newline at end of file -- Gitee From 7f76b22494aea8e693ba0e86f9aba994ff0984ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E4=BC=9F=E6=9D=B0?= <2997495035@qq.com> Date: Sun, 5 Jun 2022 15:44:04 +0000 Subject: [PATCH 4/5] =?UTF-8?q?=E6=96=B0=E5=BB=BA=202022.6.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "31\351\231\210\344\274\237\346\235\260/2022.6.5/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "31\351\231\210\344\274\237\346\235\260/2022.6.5/.keep" diff --git "a/31\351\231\210\344\274\237\346\235\260/2022.6.5/.keep" "b/31\351\231\210\344\274\237\346\235\260/2022.6.5/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From b4dd6a89826234708bda729bf8ac7ea7f6a28127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E4=BC=9F=E6=9D=B0?= <2997495035@qq.com> Date: Sun, 5 Jun 2022 15:45:23 +0000 Subject: [PATCH 5/5] 31 --- .../2022.6.5/WebForm1.aspx" | 145 ++++++++++++++++++ .../2022.6.5/WebForm1.aspx.cs" | 54 +++++++ 2 files changed, 199 insertions(+) create mode 100644 "31\351\231\210\344\274\237\346\235\260/2022.6.5/WebForm1.aspx" create mode 100644 "31\351\231\210\344\274\237\346\235\260/2022.6.5/WebForm1.aspx.cs" diff --git "a/31\351\231\210\344\274\237\346\235\260/2022.6.5/WebForm1.aspx" "b/31\351\231\210\344\274\237\346\235\260/2022.6.5/WebForm1.aspx" new file mode 100644 index 0000000..5282a43 --- /dev/null +++ "b/31\351\231\210\344\274\237\346\235\260/2022.6.5/WebForm1.aspx" @@ -0,0 +1,145 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="注册页面.WebForm1" %> + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
用户注册
用户名: + + +
密码: + + + +
密码确认: + + + +
密保问题: + + 自定义 + 傻逼徐立洋 + 徐立洋是傻逼吗 + 徐立洋是傻逼吧 + + +
+ + +
密保答案: + + +
邮箱: + + + +
联系电话: + + + +
性别: + + + + + +
专业: + + j + h + .n + c + s + + +
爱好: + + 抽烟 + 喝酒 + 烫头发 + 打游戏 + 吃饭 + 睡觉 + +
头像: + + +
自我介绍: + + +
+ +   +
+
+
+ + diff --git "a/31\351\231\210\344\274\237\346\235\260/2022.6.5/WebForm1.aspx.cs" "b/31\351\231\210\344\274\237\346\235\260/2022.6.5/WebForm1.aspx.cs" new file mode 100644 index 0000000..d229cf3 --- /dev/null +++ "b/31\351\231\210\344\274\237\346\235\260/2022.6.5/WebForm1.aspx.cs" @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Data.SqlClient; +using System.Data; +namespace 注册页面 +{ + public partial class WebForm1 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + UnobtrusiveValidationMode = UnobtrusiveValidationMode.None; + } + + protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) + { + if (DropDownList1.SelectedValue == "自定义") + { + RequiredFieldValidator4.Enabled = true; + TextBox4.Enabled = true; + } + else + { + RequiredFieldValidator4.Enabled = false; + TextBox4.Enabled = false; + } + } + + protected void Button1_Click(object sender, EventArgs e) + { + + string sql = $"insert into UserInfo(username,password,sex,email,intro,head_image,roleName,isEnable)values('{TextBox1.Text}', '{TextBox2.Text}', {RadioButtonList1.SelectedValue}, '{TextBox6.Text}', '{TextBox8.Text}', '{FileUpload1.FileName}', '', '')"; + string con = "server=LAPTOP-RSL6H4DF;database=UserDB;uid=sa;pwd=1118;"; + + SqlConnection sqlConnection = new SqlConnection(con); + sqlConnection.Open(); + SqlCommand sqlCommand = new SqlCommand(sql, sqlConnection); + + if (sqlCommand.ExecuteNonQuery()>0) + { + Response.Write(""); + Response.Redirect("~/login.aspx"); + } + else + { + Response.Write(""); + } + sqlConnection.Close(); + } + } +} \ No newline at end of file -- Gitee