diff --git "a/23\346\275\230\350\276\211\350\276\276/\344\275\234\344\270\232/\347\254\254\345\233\233\347\253\240/.keep" "b/23\346\275\230\350\276\211\350\276\276/\344\275\234\344\270\232/\347\254\254\345\233\233\347\253\240/.keep" new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git "a/23\346\275\230\350\276\211\350\276\276/\344\275\234\344\270\232/\347\254\254\345\233\233\347\253\240/WebForm1.aspx(1).cs" "b/23\346\275\230\350\276\211\350\276\276/\344\275\234\344\270\232/\347\254\254\345\233\233\347\253\240/WebForm1.aspx(1).cs" new file mode 100644 index 0000000000000000000000000000000000000000..c0541deae58be4515495de8164253a2cd1c16072 --- /dev/null +++ "b/23\346\275\230\350\276\211\350\276\276/\344\275\234\344\270\232/\347\254\254\345\233\233\347\253\240/WebForm1.aspx(1).cs" @@ -0,0 +1,39 @@ +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