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 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 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 0000000000000000000000000000000000000000..0d8778831f5c1457b6e80f184c99d12a2f577b3f --- /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 0000000000000000000000000000000000000000..139e30f7cf2cef3fd28dbd36786c12e7b17952a0 --- /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