From 9f4c9caab771cc77342425db0fcb8db40fa60844 Mon Sep 17 00:00:00 2001 From: cowlong <1220590642@qq.com> Date: Sat, 26 Jun 2021 15:08:57 +0800 Subject: [PATCH] 6.21 --- .../WebForm1.aspx" | 23 ++++ .../WebForm1.aspx.cs" | 26 ++++ .../WebForm1.aspx.designer.cs" | 62 ++++++++++ .../WebForm2.aspx" | 25 ++++ .../WebForm2.aspx.cs" | 46 +++++++ .../WebForm2.aspx.designer.cs" | 80 ++++++++++++ .../WebForm3.aspx" | 17 +++ .../WebForm3.aspx.cs" | 22 ++++ .../WebForm3.aspx.designer.cs" | 35 ++++++ .../\350\264\255\347\211\251/WebForm1.aspx" | 30 +++++ .../WebForm1.aspx.cs" | 64 ++++++++++ .../WebForm1.aspx.designer.cs" | 116 ++++++++++++++++++ .../\350\264\255\347\211\251/WebForm2.aspx" | 16 +++ .../WebForm2.aspx.cs" | 22 ++++ .../WebForm2.aspx.designer.cs" | 25 ++++ .../\350\264\255\347\211\251/WebForm3.aspx" | 20 +++ .../WebForm3.aspx.cs" | 31 +++++ .../WebForm3.aspx.designer.cs" | 62 ++++++++++ 18 files changed, 722 insertions(+) create mode 100644 "\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm1.aspx" create mode 100644 "\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm1.aspx.cs" create mode 100644 "\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm1.aspx.designer.cs" create mode 100644 "\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm2.aspx" create mode 100644 "\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm2.aspx.cs" create mode 100644 "\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm2.aspx.designer.cs" create mode 100644 "\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm3.aspx" create mode 100644 "\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm3.aspx.cs" create mode 100644 "\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm3.aspx.designer.cs" create mode 100644 "\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm1.aspx" create mode 100644 "\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm1.aspx.cs" create mode 100644 "\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm1.aspx.designer.cs" create mode 100644 "\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm2.aspx" create mode 100644 "\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm2.aspx.cs" create mode 100644 "\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm2.aspx.designer.cs" create mode 100644 "\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm3.aspx" create mode 100644 "\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm3.aspx.cs" create mode 100644 "\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm3.aspx.designer.cs" diff --git "a/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm1.aspx" "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm1.aspx" new file mode 100644 index 0000000..d4eb06d --- /dev/null +++ "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm1.aspx" @@ -0,0 +1,23 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication8.WebForm1" %> + + + + + + + + + + <%--聊天室、购物车、网站访问人数统计、Cookie记录登录信息。 +聊天室必做! +其它选做!--%> +
+
+ 用户名:
+ 密码:
+ + +
+
+ + diff --git "a/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm1.aspx.cs" "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm1.aspx.cs" new file mode 100644 index 0000000..73079b0 --- /dev/null +++ "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm1.aspx.cs" @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace WebApplication8 +{ + public partial class WebForm1 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + + protected void Button1_Click(object sender, EventArgs e) + { + Session["UserName"] = TextBox1.Text; + + Response.Cookies["Pwd"].Value = TextBox2.Text; + + Response.Redirect("WebForm2.aspx"); + } + } +} \ No newline at end of file diff --git "a/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm1.aspx.designer.cs" "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm1.aspx.designer.cs" new file mode 100644 index 0000000..27b4718 --- /dev/null +++ "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm1.aspx.designer.cs" @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace WebApplication8 +{ + + + public partial class WebForm1 + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// TextBox1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.TextBox TextBox1; + + /// + /// TextBox2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.TextBox TextBox2; + + /// + /// Button1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Button Button1; + + /// + /// Literal1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Literal Literal1; + } +} diff --git "a/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm2.aspx" "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm2.aspx" new file mode 100644 index 0000000..f91d4c7 --- /dev/null +++ "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm2.aspx" @@ -0,0 +1,25 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="WebApplication8.WebForm2" %> + + + + + + + + + +
+
+ +
+ + +    +   + +   + + + + + diff --git "a/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm2.aspx.cs" "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm2.aspx.cs" new file mode 100644 index 0000000..0de3edf --- /dev/null +++ "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm2.aspx.cs" @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace WebApplication8 +{ + public partial class WebForm2 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + if (Session["UserName"]==null||Request.Cookies["Pwd"]==null) + { + + Response.Redirect("WebForm1.aspx"); + + } + if (Application["ChatRoom"]==null) + { + + Application["ChatRoom"] = new Panel(); + + } + Panel1.Controls.Add((Panel)Application["ChatRoom"]); + } + + protected void Button1_Click(object sender, EventArgs e) + { + string name = Session["UserName"].ToString(); + string time = DateTime.Now.ToString(); + string text = TextBox1.Text; + + Literal literal = new Literal(); + literal.Text = name + "" + time + ":" + text + "" +"
"; + ((Panel)Application["ChatRoom"]).Controls.Add(literal); + } + + protected void Button3_Click(object sender, EventArgs e) + { + Session.Abandon(); + Response.Redirect("WebForm1.aspx"); + } + } +} \ No newline at end of file diff --git "a/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm2.aspx.designer.cs" "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm2.aspx.designer.cs" new file mode 100644 index 0000000..e2b02e5 --- /dev/null +++ "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm2.aspx.designer.cs" @@ -0,0 +1,80 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace WebApplication8 +{ + + + public partial class WebForm2 + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Panel Panel1; + + /// + /// Panel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Panel Panel2; + + /// + /// TextBox1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.TextBox TextBox1; + + /// + /// Button1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Button Button1; + + /// + /// Button2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Button Button2; + + /// + /// Button3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Button Button3; + } +} diff --git "a/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm3.aspx" "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm3.aspx" new file mode 100644 index 0000000..db0396b --- /dev/null +++ "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm3.aspx" @@ -0,0 +1,17 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm3.aspx.cs" Inherits="WebApplication8.WebForm3" %> + + + + + + + + + +
+
+ +
+
+ + diff --git "a/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm3.aspx.cs" "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm3.aspx.cs" new file mode 100644 index 0000000..bf3d843 --- /dev/null +++ "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/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 WebApplication8 +{ + public partial class WebForm3 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + Response.Write($"当前在线人数{Application["OnlineNum"]},总访问人数{Application["VisitedNum"]}个"); + } + + protected void Button1_Click(object sender, EventArgs e) + { + Session.Abandon(); + } + } +} \ No newline at end of file diff --git "a/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm3.aspx.designer.cs" "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm3.aspx.designer.cs" new file mode 100644 index 0000000..c774913 --- /dev/null +++ "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\201\212\345\244\251\345\256\244/WebForm3.aspx.designer.cs" @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace WebApplication8 +{ + + + public partial class WebForm3 + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// Button1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Button Button1; + } +} diff --git "a/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm1.aspx" "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm1.aspx" new file mode 100644 index 0000000..56f4c0a --- /dev/null +++ "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm1.aspx" @@ -0,0 +1,30 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication10.WebForm1" %> + + + + + + + + + +
+
+
+
+
+
+
+



+ + + +   + +   +
+ +
+
+ + diff --git "a/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm1.aspx.cs" "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm1.aspx.cs" new file mode 100644 index 0000000..6832ab0 --- /dev/null +++ "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm1.aspx.cs" @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace WebApplication10 +{ + public partial class WebForm1 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Session["goods"] = new List(); + } + if (Session["CurrentUser"]==null) + { + Literal1.Text="您还未登录,请您先登录!"; + } + else + { + Literal1.Text = "欢迎您" + Session["CurrentUser"].ToString() + "
" + Session.SessionID; + } + } + + protected void Button1_Click(object sender, EventArgs e) + { + if (Session["CurrentUser"] == null) + { + Response.Redirect("Webform3.aspx"); + } + else + { + List list = (List)Session["goods"]; + + foreach (Control item in form1.Controls) + { + if (item is CheckBox) + { + CheckBox cb = (CheckBox)item; + if (cb.Checked) + { + list.Add(cb.Text); + } + } + } + Button1.Text = "添加成功!"; + } + } + + protected void Button2_Click(object sender, EventArgs e) + { + Response.Redirect("Webform2.aspx"); + } + + protected void Button3_Click(object sender, EventArgs e) + { + Session.Abandon(); + Literal1.Text = "您还未登录,清先登录!"; + } + } +} \ No newline at end of file diff --git "a/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm1.aspx.designer.cs" "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm1.aspx.designer.cs" new file mode 100644 index 0000000..49fd19f --- /dev/null +++ "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm1.aspx.designer.cs" @@ -0,0 +1,116 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace WebApplication10 +{ + + + public partial class WebForm1 + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// CheckBox1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.CheckBox CheckBox1; + + /// + /// CheckBox2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.CheckBox CheckBox2; + + /// + /// CheckBox3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.CheckBox CheckBox3; + + /// + /// CheckBox4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.CheckBox CheckBox4; + + /// + /// CheckBox5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.CheckBox CheckBox5; + + /// + /// CheckBox6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.CheckBox CheckBox6; + + /// + /// Button1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Button Button1; + + /// + /// Button2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Button Button2; + + /// + /// Button3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Button Button3; + + /// + /// Literal1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Literal Literal1; + } +} diff --git "a/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm2.aspx" "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm2.aspx" new file mode 100644 index 0000000..7253658 --- /dev/null +++ "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm2.aspx" @@ -0,0 +1,16 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="WebApplication10.WebForm2" %> + + + + + + + + + +
+
+
+
+ + diff --git "a/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm2.aspx.cs" "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm2.aspx.cs" new file mode 100644 index 0000000..0771241 --- /dev/null +++ "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm2.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 WebApplication10 +{ + public partial class WebForm2 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + string goodStr = ""; + foreach (string item in (List)Session["goods"]) + { + goodStr += item + ""; + Response.Write("购物车:"+goodStr); + } + } + } +} \ No newline at end of file diff --git "a/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm2.aspx.designer.cs" "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm2.aspx.designer.cs" new file mode 100644 index 0000000..82b36fc --- /dev/null +++ "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm2.aspx.designer.cs" @@ -0,0 +1,25 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + + +namespace WebApplication10 +{ + public partial class WebForm2 + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + } +} diff --git "a/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm3.aspx" "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm3.aspx" new file mode 100644 index 0000000..2443396 --- /dev/null +++ "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm3.aspx" @@ -0,0 +1,20 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm3.aspx.cs" Inherits="WebApplication10.WebForm3" %> + + + + + + + + + +
+
+ 用户名:
+ 密码:
+ + +
+
+ + diff --git "a/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm3.aspx.cs" "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm3.aspx.cs" new file mode 100644 index 0000000..46be4c5 --- /dev/null +++ "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm3.aspx.cs" @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace WebApplication10 +{ + public partial class WebForm3 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + + protected void Button1_Click(object sender, EventArgs e) + { + if (TextBox1.Text=="admin" && TextBox2.Text == "123") + { + Session["CurrentUser"] = TextBox1.Text; + Literal1.Text = "登录成功!"; + Response.Redirect("Webform1.aspx"); + } + else + { + Literal1.Text = "用户名或密码错误!"; + } + } + } +} \ No newline at end of file diff --git "a/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm3.aspx.designer.cs" "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm3.aspx.designer.cs" new file mode 100644 index 0000000..483bac2 --- /dev/null +++ "b/\347\254\2545\346\254\241\344\275\234\344\270\232/\346\237\257\346\226\207\351\276\231/\350\264\255\347\211\251/WebForm3.aspx.designer.cs" @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace WebApplication10 +{ + + + public partial class WebForm3 + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// TextBox1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.TextBox TextBox1; + + /// + /// TextBox2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.TextBox TextBox2; + + /// + /// Button1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Button Button1; + + /// + /// Literal1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Literal Literal1; + } +} -- Gitee