Have you got a CascadingDropDown working with ASP.

2019-04-09 06:40发布

问题:

If so how?

Did you roll your own with jQuery or use the Microsoft AJAX toolkit?

Did you create a webservice or call an action?


EDIT : Please note that this question was asked before Microsoft announced that they were going to bundle jQuery in with VS/ASP.NET MVC. I think there is less of a discussion around this topic now and the answer would now almost always be 'use jQuery'. IainMH 11th Feb 2009

回答1:

jQuery, action, return JSON.

http://devlicio.us/blogs/mike_nichols/archive/2008/05/25/jquery-cascade-cascading-values-from-forms.aspx



回答2:

I've spent the past day or two getting @Matt Hinze's answer to work. It works well. jQuery is the prefferred method of doing AJAX in the forthcoming ASP.NET MVC In Action book from Manning. You can get a pdf of a free preview chapter on AJAX in MVC here.

However, Stephen Walther in his excellent ASP.NET Tip series has just blogged about creating cascading dropdowns in Tip #41.



回答3:

CascadingDropDown jQuery Plugin for ASP.NET MVC

http://weblogs.asp.net/rajbk/archive/2010/05/20/cascadingdropdown-jquery-plugin-for-asp-net-mvc.aspx



回答4:

http://blog.noma.li/2010/03/autopostback-and-cascading-drop-downs-in-asp-net-mvc-and-jquery/