diff --git "a/\347\254\2544\346\254\241\344\275\234\344\270\232/\345\214\205\346\254\243\345\246\202/WebForm1.aspx" "b/\347\254\2544\346\254\241\344\275\234\344\270\232/\345\214\205\346\254\243\345\246\202/WebForm1.aspx" new file mode 100644 index 0000000000000000000000000000000000000000..f4020b7c23f52ac67473b48593635aee75ecc720 --- /dev/null +++ "b/\347\254\2544\346\254\241\344\275\234\344\270\232/\345\214\205\346\254\243\345\246\202/WebForm1.aspx" @@ -0,0 +1,23 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %> + + + + + + + + + +
+
+ 用户名: +
+ 密码: +
+ +     + +
+
+ + diff --git "a/\347\254\2544\346\254\241\344\275\234\344\270\232/\345\214\205\346\254\243\345\246\202/WebForm1.aspx.cs" "b/\347\254\2544\346\254\241\344\275\234\344\270\232/\345\214\205\346\254\243\345\246\202/WebForm1.aspx.cs" new file mode 100644 index 0000000000000000000000000000000000000000..e8e93f0d7f428e08649fed6215fb0fb0e919e38b --- /dev/null +++ "b/\347\254\2544\346\254\241\344\275\234\344\270\232/\345\214\205\346\254\243\345\246\202/WebForm1.aspx.cs" @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace WebApplication1 +{ + public partial class WebForm1 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + } + + protected void Button1_Click(object sender, EventArgs e) + { + string userName = Request.Form["TextBox1"]; + string password = Request.Form["TextBox2"]; + } + + protected void Button2_Click(object sender, EventArgs e) + { + string username = TextBox1.Text; + string pwd = TextBox2.Text; + Response.Redirect($"WebForm2.aspx?UserName={username}&PassWord={pwd}"); + } + } +} \ No newline at end of file diff --git "a/\347\254\2544\346\254\241\344\275\234\344\270\232/\345\214\205\346\254\243\345\246\202/WebForm2.aspx" "b/\347\254\2544\346\254\241\344\275\234\344\270\232/\345\214\205\346\254\243\345\246\202/WebForm2.aspx" new file mode 100644 index 0000000000000000000000000000000000000000..ce8759767e8aa0d21b0db1650ee7fb6c80a0e1c3 --- /dev/null +++ "b/\347\254\2544\346\254\241\344\275\234\344\270\232/\345\214\205\346\254\243\345\246\202/WebForm2.aspx" @@ -0,0 +1,16 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="WebApplication1.WebForm2" %> + + + + + + + + + +
+
+
+
+ + diff --git "a/\347\254\2544\346\254\241\344\275\234\344\270\232/\345\214\205\346\254\243\345\246\202/WebForm2.aspx.cs" "b/\347\254\2544\346\254\241\344\275\234\344\270\232/\345\214\205\346\254\243\345\246\202/WebForm2.aspx.cs" new file mode 100644 index 0000000000000000000000000000000000000000..7bdbabe7dfb931654fc697256c0db89596b03660 --- /dev/null +++ "b/\347\254\2544\346\254\241\344\275\234\344\270\232/\345\214\205\346\254\243\345\246\202/WebForm2.aspx.cs" @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace WebApplication1 +{ + public partial class WebForm2 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + string userName = Request.Form["TextBox1"]; + string password = Request.Form["TextBox2"]; + + Response.Write($"

Form:欢迎你,{userName},您的密码是:{password}

"); + + string userName2 = Request.QueryString["UserName"]; + string password2 = Request.QueryString["PassWord"]; + + Response.Write($"

QueryString:欢迎你,{userName2},您的密码是:{password2}

"); + + string userName3 = Request.Params["TextBox1"]; + string password3 = Request.Params["TextBox2"]; + + Response.Write($"

Params:欢迎你,{userName3},您的密码是:{password3}

"); + + string userName4 = ""; + string password4 = ""; + if (PreviousPage != null) + { + TextBox UserNameBox = (TextBox)PreviousPage.FindControl("TextBox1"); + TextBox PasswordBox = (TextBox)PreviousPage.FindControl("TextBox2"); + if (UserNameBox != null) + { + userName4 = UserNameBox.Text; + } + if (PasswordBox != null) + { + password4 = PasswordBox.Text; + } + } + Response.Write($"

PerviousPage:欢迎你,{userName4},您的密码是:{password4}

"); + } + } +} \ No newline at end of file diff --git "a/\347\254\2544\346\254\241\344\275\234\344\270\232/\351\231\210\346\225\217\351\222\212/WebForm1.aspx" "b/\347\254\2544\346\254\241\344\275\234\344\270\232/\351\231\210\346\225\217\351\222\212/WebForm1.aspx" new file mode 100644 index 0000000000000000000000000000000000000000..f4020b7c23f52ac67473b48593635aee75ecc720 --- /dev/null +++ "b/\347\254\2544\346\254\241\344\275\234\344\270\232/\351\231\210\346\225\217\351\222\212/WebForm1.aspx" @@ -0,0 +1,23 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %> + + + + + + + + + +
+
+ 用户名: +
+ 密码: +
+ +     + +
+
+ + diff --git "a/\347\254\2544\346\254\241\344\275\234\344\270\232/\351\231\210\346\225\217\351\222\212/WebForm1.aspx.cs" "b/\347\254\2544\346\254\241\344\275\234\344\270\232/\351\231\210\346\225\217\351\222\212/WebForm1.aspx.cs" new file mode 100644 index 0000000000000000000000000000000000000000..e8e93f0d7f428e08649fed6215fb0fb0e919e38b --- /dev/null +++ "b/\347\254\2544\346\254\241\344\275\234\344\270\232/\351\231\210\346\225\217\351\222\212/WebForm1.aspx.cs" @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace WebApplication1 +{ + public partial class WebForm1 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + } + + protected void Button1_Click(object sender, EventArgs e) + { + string userName = Request.Form["TextBox1"]; + string password = Request.Form["TextBox2"]; + } + + protected void Button2_Click(object sender, EventArgs e) + { + string username = TextBox1.Text; + string pwd = TextBox2.Text; + Response.Redirect($"WebForm2.aspx?UserName={username}&PassWord={pwd}"); + } + } +} \ No newline at end of file diff --git "a/\347\254\2544\346\254\241\344\275\234\344\270\232/\351\231\210\346\225\217\351\222\212/WebForm2.aspx" "b/\347\254\2544\346\254\241\344\275\234\344\270\232/\351\231\210\346\225\217\351\222\212/WebForm2.aspx" new file mode 100644 index 0000000000000000000000000000000000000000..ce8759767e8aa0d21b0db1650ee7fb6c80a0e1c3 --- /dev/null +++ "b/\347\254\2544\346\254\241\344\275\234\344\270\232/\351\231\210\346\225\217\351\222\212/WebForm2.aspx" @@ -0,0 +1,16 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="WebApplication1.WebForm2" %> + + + + + + + + + +
+
+
+
+ + diff --git "a/\347\254\2544\346\254\241\344\275\234\344\270\232/\351\231\210\346\225\217\351\222\212/WebForm2.aspx.cs" "b/\347\254\2544\346\254\241\344\275\234\344\270\232/\351\231\210\346\225\217\351\222\212/WebForm2.aspx.cs" new file mode 100644 index 0000000000000000000000000000000000000000..7bdbabe7dfb931654fc697256c0db89596b03660 --- /dev/null +++ "b/\347\254\2544\346\254\241\344\275\234\344\270\232/\351\231\210\346\225\217\351\222\212/WebForm2.aspx.cs" @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace WebApplication1 +{ + public partial class WebForm2 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + string userName = Request.Form["TextBox1"]; + string password = Request.Form["TextBox2"]; + + Response.Write($"

Form:欢迎你,{userName},您的密码是:{password}

"); + + string userName2 = Request.QueryString["UserName"]; + string password2 = Request.QueryString["PassWord"]; + + Response.Write($"

QueryString:欢迎你,{userName2},您的密码是:{password2}

"); + + string userName3 = Request.Params["TextBox1"]; + string password3 = Request.Params["TextBox2"]; + + Response.Write($"

Params:欢迎你,{userName3},您的密码是:{password3}

"); + + string userName4 = ""; + string password4 = ""; + if (PreviousPage != null) + { + TextBox UserNameBox = (TextBox)PreviousPage.FindControl("TextBox1"); + TextBox PasswordBox = (TextBox)PreviousPage.FindControl("TextBox2"); + if (UserNameBox != null) + { + userName4 = UserNameBox.Text; + } + if (PasswordBox != null) + { + password4 = PasswordBox.Text; + } + } + Response.Write($"

PerviousPage:欢迎你,{userName4},您的密码是:{password4}

"); + } + } +} \ No newline at end of file