This sample shows how to implement cascading drop down lists in ASP.Net MVC. The user is presented with a list of countries. Once a country is selected, a new drop down list is displayed with the states in the selected country.After selecting the Country, the State Drop Down Lis
I found that the line
var URL = $("#CountryStateFormID").data("stateListAction");
fails in jquery-1.8.2 and also 2.2.1, i haven't tested any versions or found why this happens. In your downloadable code it's using version 1.5.1 and it's working fine.
It gets an Undefined because it seems not to find the stateListAction data attribute.
Instead I found I can use .attr("data-stateListAction") to make it work.
I ran into this same problem using jquery-1.7.1; within countryState.js, by using .attr("data-stateListAction"); instead of .data("stateListAction"); it worked great for me. Thanks for having posted this! You saved my day.
I have two things in my view 'ListUrl.cshtml' a dropdown list filled with the names of URLs. and list (html Table) where 'URLs' as the first column. I want that the data in the table depends on the change in ddl selection.
how can I achieve something like this.
apologize because I am new to MVC, I have always worked with webforms.
Hello Rick.I want to ask you something.It seems that my js file is working but it doesn't seem that when the url is generated from the json the actionresult is never called.I ve checked names and so forth!
Hello i am using recursive Database table for category.
I want to implement Cascading DropDownList that can load as many dropdownlist for category that have multiple hierarchy of subcategories.
How to do using ASP.NET MVC ? any Hint.
I am not using entity framework and razor view.
I have made object class of database table.
I'm trying to import your solution into VS2008 to see how it works and I noticed right from the beginning that the views are .cshtml whereas in VS2008, the views are .aspx. What's the difference between the two formats and is there some way to convert cshtml to aspx?
Help us improve MSDN.
Visit our UserVoice Page to submit and vote on ideas!