Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Have you got a CascadingDropDown working with ASP.NET MVC?

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

like image 948
Iain Holder Avatar asked Sep 02 '08 15:09

Iain Holder


3 Answers

jQuery, action, return JSON.

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

like image 91
Matt Hinze Avatar answered Nov 12 '22 10:11

Matt Hinze


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.

like image 2
Iain Holder Avatar answered Nov 12 '22 09:11

Iain Holder


CascadingDropDown jQuery Plugin for ASP.NET MVC

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

like image 2
Raj Kaimal Avatar answered Nov 12 '22 10:11

Raj Kaimal