(一). 示例图片
(二). 详细代码
1. 页面前台代码
1
<body>
2
<form id="form1" runat="server">
3
<div>
4
<asp:Panel ID="Panel2" runat="server" BackColor="#FFC080" Font-Size="X-Large"
5
ForeColor="#C04000" Height="50px" Width="387px">
6
DropDownList 联动示例:</asp:Panel>
7
<asp:Panel ID="Panel1" runat="server" BackColor="#C0C0FF" Height="170px" Width="387px">
8
<br />
9
请选择类别:<br />
10
<br />
11
12
<asp:DropDownList ID="ddl1" runat="server">
13
</asp:DropDownList>
14
<asp:DropDownList ID="ddl2" runat="server">
15
</asp:DropDownList>
16
<asp:DropDownList ID="ddl3" runat="server">
17
</asp:DropDownList> <br />
18
<br />
19
20
<C1:RelatedList id="rl1" runat="server"></C1:RelatedList>
21
<asp:Button ID="btOK" runat="server" OnClick="Button1_Click" Text="取值" Width="67px" />
22
</asp:Panel>
23
</div>
24
</form>
25
</body>
26
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
2.页面后台代码
1
protected void Page_Load(object sender, EventArgs e)
2
2
(三).示例代码下载