From badab39dff25b44b4315416d39a7c082c275430c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=B9=98=E7=90=AA?= <2831539223@qq.com> Date: Mon, 23 May 2022 05:03:05 +0000 Subject: [PATCH 1/5] =?UTF-8?q?=E6=96=B0=E5=BB=BA=2022=E8=AE=B8=E6=B9=98?= =?UTF-8?q?=E7=90=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "22\350\256\270\346\271\230\347\220\252/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "22\350\256\270\346\271\230\347\220\252/.keep" diff --git "a/22\350\256\270\346\271\230\347\220\252/.keep" "b/22\350\256\270\346\271\230\347\220\252/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From f48572942fe025da25602a4d884fa92c96902c54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=B9=98=E7=90=AA?= <2831539223@qq.com> Date: Mon, 23 May 2022 05:03:21 +0000 Subject: [PATCH 2/5] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\344\275\234\344\270\232/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/.keep" diff --git "a/22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/.keep" "b/22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From b935e788cdc195dc726c7da2b076d8c0f5ce6f0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=B9=98=E7=90=AA?= <2831539223@qq.com> Date: Mon, 23 May 2022 05:03:33 +0000 Subject: [PATCH 3/5] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20=E7=AC=AC=E4=B8=89?= =?UTF-8?q?=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\347\254\254\344\270\211\347\253\240/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/\347\254\254\344\270\211\347\253\240/.keep" diff --git "a/22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/\347\254\254\344\270\211\347\253\240/.keep" "b/22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/\347\254\254\344\270\211\347\253\240/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From b73b7dc55bacf1a06e778eb5952f9911f5705b87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=B9=98=E7=90=AA?= <2831539223@qq.com> Date: Mon, 23 May 2022 05:04:41 +0000 Subject: [PATCH 4/5] =?UTF-8?q?=E6=96=B0=E5=BB=BA=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\347\254\254\344\270\211\347\253\240/1/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/\347\254\254\344\270\211\347\253\240/1/.keep" diff --git "a/22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/\347\254\254\344\270\211\347\253\240/1/.keep" "b/22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/\347\254\254\344\270\211\347\253\240/1/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From dcd272a7c8f015b5e1741865bacc61985f24df4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=B9=98=E7=90=AA?= <2831539223@qq.com> Date: Mon, 23 May 2022 05:05:29 +0000 Subject: [PATCH 5/5] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../1/WebForm1.aspx" | 138 ++++++++++++++++++ .../1/WebForm1.aspx.cs" | 47 ++++++ .../1/WebForm2.aspx" | 17 +++ .../1/WebForm2.aspx.cs" | 33 +++++ 4 files changed, 235 insertions(+) create mode 100644 "22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/\347\254\254\344\270\211\347\253\240/1/WebForm1.aspx" create mode 100644 "22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/\347\254\254\344\270\211\347\253\240/1/WebForm1.aspx.cs" create mode 100644 "22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/\347\254\254\344\270\211\347\253\240/1/WebForm2.aspx" create mode 100644 "22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/\347\254\254\344\270\211\347\253\240/1/WebForm2.aspx.cs" diff --git "a/22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/\347\254\254\344\270\211\347\253\240/1/WebForm1.aspx" "b/22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/\347\254\254\344\270\211\347\253\240/1/WebForm1.aspx" new file mode 100644 index 0000000..7920653 --- /dev/null +++ "b/22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/\347\254\254\344\270\211\347\253\240/1/WebForm1.aspx" @@ -0,0 +1,138 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="_220519._5.WebForm1" %> + + + + + + + + + <%--框架设置:style--%> + + + +
+
+ + +
+ + <%--TextMode="passord":设置密码--%> +
+ + +
+ +
+ + +
+ + <%-- GroupName:定义单选框所属的组 + redioButton:单选框--%> +
+ + <%-- RadioButtonList单选列表,RepeatDirection项的显示方向Horizontal(水平) --%> + + <%-- ListItem代表列表项,Value为值,Text显示文本,Selected默认选中项 --%> + + + +
+ +
+ + + 福建省 + 湖南省 + 四川省 + 广西省 + +
+ + <%--RepeatDirection="Horizpontal":使项水平显示--%> +
+ + + 编程 + 唱歌 + 打球 + +
+ +
+ + +
+ +
+ + +
+ + + <%--TextMode="MultiLine":设置多行信息 + --%> +
+ + +
+ +
+ + <%-- FileUpload文件上传控件,选择文件上传到服务器 --%> + +
+ + <%--Image:图片显示的控件--%> + +
+ + <%--上传文件的按钮,对其进行图片的上传设置设置--%> +
+ +
+ +
+ + <%--PostBackUrl:跳转的页面--%> +
+ +
+ +
+ +
+ <%--TextMode="MultiLine":设置多行信息 + Enabled="false":设置不能输入的属性--%> + +
+
+ + diff --git "a/22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/\347\254\254\344\270\211\347\253\240/1/WebForm1.aspx.cs" "b/22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/\347\254\254\344\270\211\347\253\240/1/WebForm1.aspx.cs" new file mode 100644 index 0000000..cd91044 --- /dev/null +++ "b/22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/\347\254\254\344\270\211\347\253\240/1/WebForm1.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 _220519._5 +{ + public partial class WebForm1 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + + + //上传按钮 + protected void Button1_Click(object sender, EventArgs e) + { + //HasFile判断上传控件是否有文件 + if (FileUpload1.HasFile) + { + //获取上传控件选择的文件 + string fileName = FileUpload1.FileName; + + //"~/img/"表示服务器中保存文件的目录的虚拟路径,后面加上文件名,即为上传后文件保存的位置 + //Server.MapPath将虚拟路径转换成物理路径 + string path = Server.MapPath("~/img/" + fileName); + + //SaveAs将文件保存到服务器中,参数是保存路径,该路径必须是物理路径 + FileUpload1.SaveAs(path); + + //判断上传控件中的文件是否是图片 + if (FileUpload1.PostedFile.ContentType.Contains("image")) + { + //将图片显示到用户界面的Image1控件中 + Image1.ImageUrl = @"~/img/" + fileName; + } + + } + } + + + + } +} \ No newline at end of file diff --git "a/22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/\347\254\254\344\270\211\347\253\240/1/WebForm2.aspx" "b/22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/\347\254\254\344\270\211\347\253\240/1/WebForm2.aspx" new file mode 100644 index 0000000..6585a25 --- /dev/null +++ "b/22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/\347\254\254\344\270\211\347\253\240/1/WebForm2.aspx" @@ -0,0 +1,17 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="_220519._5.WebForm2" %> + + + + + + + + + +
+
+ +
+
+ + diff --git "a/22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/\347\254\254\344\270\211\347\253\240/1/WebForm2.aspx.cs" "b/22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/\347\254\254\344\270\211\347\253\240/1/WebForm2.aspx.cs" new file mode 100644 index 0000000..bf5e000 --- /dev/null +++ "b/22\350\256\270\346\271\230\347\220\252/\344\275\234\344\270\232/\347\254\254\344\270\211\347\253\240/1/WebForm2.aspx.cs" @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace _220519._5 +{ + public partial class WebForm2 : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + //从页面跳转时,Request可以获取页面数据 + + //Request.Form[""]:可以获取对象的集合 + string name = Request.Form["TextBox1"]; + string Sex = Request.Form["RadioButtonList1"]; + string Hobbies = Request.Form["CheckBoxList1"]; + string Birthday = Request.Form["TextBox4"]; + string Email = Request.Form["TextBox5"]; + string IP = Request.Form["TextBox7"]; + + //Response.Write向返回的响应页面对象写入数据 + Response.Write("用户名:" + name); + Response.Write("性别:" + Sex); + Response.Write("兴趣爱好:" + Hobbies); + Response.Write("出生日期:" + Birthday); + Response.Write("邮箱:" + Email); + Response.Write("地址:" + IP); + } + } +} \ No newline at end of file -- Gitee