CascadingDropDown 控件提供了级联下拉列表显示的功能。 如上所说,对于存在包含关系的下拉列表选择中,CascadingDropDown控件将会非常有用。 要是用CascadingDropDown 控件,首要现在页面上放置一个DropDownList控件,并将CascadingDropDown控件的TargetControlID设置为DropDownList 下面是CascadingDropDown的使用代码: <ajaxToolkit:CascadingDropDown ID="CDD1" runat="server" TargetControlID 控件,代码如下: <ajaxToolkit:CascadingDropDown ID="CascadingDropDown1" runat="server" TargetControlID="DropDownList1
联动式的下拉选择是一个很普遍的需求,在ASP.NET MVC中可以使用Json和jQuery来实现,更简单的是使用jQuery的级联插件CascadingDropDown ,具体参见文章http://weblogs.asp.net /rajbk/archive/2010/05/20/cascadingdropdown-jquery-plugin-for-asp-net-mvc.aspx。 1: $(targetID).CascadingDropDown(sourceID, actionPath, settings) 2: 3: •targetID 4: The