From c3622af42c4c4f910e0ee94fed86a402d62e38a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E6=B3=BD=E5=87=AF?= <1095642573@qq.com> Date: Fri, 10 Jun 2022 03:37:02 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=BB=BA=206.10DateList=E7=BB=83?= =?UTF-8?q?=E4=B9=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "6.10DateList\347\273\203\344\271\240/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "6.10DateList\347\273\203\344\271\240/.keep" diff --git "a/6.10DateList\347\273\203\344\271\240/.keep" "b/6.10DateList\347\273\203\344\271\240/.keep" new file mode 100644 index 0000000..e69de29 -- Gitee From ec379e2d454bef216e64ff8dd70dc8a5ded9a0f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E6=B3=BD=E5=87=AF?= <1095642573@qq.com> Date: Fri, 10 Jun 2022 03:38:40 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E5=8F=B6=E6=B3=BD=E5=87=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WebForm1.aspx" | 142 ++++++++++++++++++ .../WebForm1.aspx.cs" | 45 ++++++ 2 files changed, 187 insertions(+) create mode 100644 "6.10DateList\347\273\203\344\271\240/WebForm1.aspx" create mode 100644 "6.10DateList\347\273\203\344\271\240/WebForm1.aspx.cs" diff --git "a/6.10DateList\347\273\203\344\271\240/WebForm1.aspx" "b/6.10DateList\347\273\203\344\271\240/WebForm1.aspx" new file mode 100644 index 0000000..0d87788 --- /dev/null +++ "b/6.10DateList\347\273\203\344\271\240/WebForm1.aspx" @@ -0,0 +1,142 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %> + + + + + + + + + + +
+
+
+ + 列表 + 视图 + 列表+视图 + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+ + + + + +
+ + + +
  + +
+
+
+ + + + + + + + + + + + + + + + + + + + +
+
+
+ + diff --git "a/6.10DateList\347\273\203\344\271\240/WebForm1.aspx.cs" "b/6.10DateList\347\273\203\344\271\240/WebForm1.aspx.cs" new file mode 100644 index 0000000..139e30f --- /dev/null +++ "b/6.10DateList\347\273\203\344\271\240/WebForm1.aspx.cs" @@ -0,0 +1,45 @@ +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) + { + if (!IsPostBack) + { + DropDownList1_SelectedIndexChanged( sender, e); + } + } + + protected void DataList1_SelectedIndexChanged(object sender, EventArgs e) + { + + } + + protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) + { + int choice = DropDownList1.SelectedIndex; + if (choice == 0) + { + GridView1.Visible = true; + DataList1.Visible = false; + } + else if (choice == 1) + { + GridView1.Visible = false; + DataList1.Visible = true; + } + else + { + GridView1.Visible = true; + DataList1.Visible = false; + } + } + } +} \ No newline at end of file -- Gitee