Dropdownlist in asp.net mvc3
Hi,
I am working on asp.net mvc3 using ado.net asynchronous concept
I have written country dropdown as following
<select name="" class="styled" id="countryDropDown">
@foreach(var country in HttpContext.Current.Cache.Get("Countries") as List<Country>)
{
<option value="@country.Id" >@country.Name</option>
}
</select>
I have another two dropdownlists- statedropdown and citydropdown
I want to fill statedropdown based on countryId
I want to fill citydropdown based on stateId
My state controle action
public ActionResult GetStatesCompleted(IList<StateProvince> states)
{
//Up to here I am getting states list, what I have to write here for return states to view
}
Can you anyone tell me how to write controle and view to do this
Thankyou for advance...