Last post Jul 29, 2009 01:15 PM by Dilip Kumbhar
Jul 29, 2009 09:37 AM|rsrraju|LINK
In my ASP.NET MVC application, I have 2 dropdown lists.
First one with 2 items namely A.P. & U.P(states).
When I select an item in the dropdown list, second dropdown list should be populated with corresponding cities in that state. Cities names should be retrived from a table in SQL Server 2005 database.
Your help will be very much appreciated.
Jul 29, 2009 12:50 PM|Augi|LINK
This is problem of cascading dropdown lists. Look at these articles:
http://stephenwalther.com/blog/archive/2008/09/07/asp-net-mvc-tip-41-creating-cascading-dropdown-lists-with-ajax.aspx (IMHO the
Jul 29, 2009 01:15 PM|Dilip Kumbhar|LINK
On the selectedIndexchanged event of the first dropdown call a function that loads the cities.In the function pass the value of the first dropdown as parameter to the sql query and fetch the city names.