From 5e3b49224674a45a18f1a150703d4d46c6cbeaba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E9=83=81=E9=BD=90?= <2050634948@qq.com> Date: Mon, 23 May 2022 04:04:10 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=206?= =?UTF-8?q?=E5=8F=B7=E9=99=88=E5=98=89=E9=91=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "6\345\217\267\351\231\210\345\230\211\351\221\253/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 "6\345\217\267\351\231\210\345\230\211\351\221\253/.keep" diff --git "a/6\345\217\267\351\231\210\345\230\211\351\221\253/.keep" "b/6\345\217\267\351\231\210\345\230\211\351\221\253/.keep" deleted file mode 100644 index e69de29..0000000 -- Gitee From ef30c0243d5aef2bd83101d69db79835d0fccbdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9C=E7=8E=8B=E9=83=81=E9=BD=90=E2=80=9D?= <“2050634948@qq.com”> Date: Tue, 24 May 2022 21:44:28 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=BB=83=E4=B9=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebForm1.aspx.cs | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 WebForm1.aspx.cs diff --git a/WebForm1.aspx.cs b/WebForm1.aspx.cs new file mode 100644 index 0000000..7e916bf --- /dev/null +++ b/WebForm1.aspx.cs @@ -0,0 +1,38 @@ +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 (!Page.IsPostBack) { + SqlDataSource1.SelectCommand = "select * from city where type=1 "; + SqlDataSource2.SelectCommand = "select * from city where type=2 and pid=2"; + SqlDataSource3.SelectCommand = "select * from city where type=3 and pid in (select id from city where type = 2 and pid = 2)"; + } + + } + + protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) + { + SqlDataSource2.SelectCommand = "select * from city where type=2 and pid=" + DropDownList1.SelectedValue; + SqlDataSource3.SelectCommand = "select * from city where type=3 and pid in (select id from city where type = 2 and pid = " + DropDownList1.SelectedValue+")"; + } + + protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e) + { + SqlDataSource3.SelectCommand = "select * from city where type=3 and pid =" + DropDownList2.SelectedValue; + } + + protected void DropDownList3_SelectedIndexChanged(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file -- Gitee