【发布时间】:2014-01-15 06:13:11
【问题描述】:
我想根据我在下拉框 1 中所做的选择显示第二个下拉框 我是 asp.net 的新手,在 asp.net 中使用 c#,我不知道 java script 和 jquery,所以我知道 html 和 CSS,代码如下:
<asp:DropDownList ID="typeselect" runat="server" AutoPostBack="true" OnSelectedIndexChanged="typeselect_SelectedIndexChanged">
<asp:ListItem Selected="True" Text="cash" Value="0"></asp:ListItem>
<asp:ListItem Text="Traveller's cheque" Value="1"></asp:ListItem>
</asp:DropDownList>
当我从上面的代码中选择旅行支票时,我想获得另一个与我选择现金时不同的下拉框。当从以上列表项中选择现金时,以下下拉框是默认的。
当用户选择旅行支票时,我如何显示以上代码? 请帮我实现这个.. 提前谢谢你..
【问题讨论】:
-
你想用jQuery还是C#来实现它?
-
好的。在下面提供了答案,请检查