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 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 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 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 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 0000000000000000000000000000000000000000..a0a259068b7df49490d900a31ce87d2fd0bc1ab9 --- /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 0000000000000000000000000000000000000000..b447f8ff62f9b927084917758f7f876140e02c66 --- /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 0000000000000000000000000000000000000000..271f0f39259863ce1bf9a954dc179b20298e3878 --- /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 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 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 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 0000000000000000000000000000000000000000..5282a438d58a6d9c2f9c7201255f510ad4732100 --- /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 0000000000000000000000000000000000000000..d229cf375a9b0f0f64d9765b52fe2b772555b204 --- /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