Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi..

I have two dropdown list in View
XML
<p>Districts: @Html.DropDownList("DsCode", String.Empty )</p>
<p>Towns: @Html.DropDownList("TnCode",String.Empty )</p>


in Controller :

SQL
ViewBag.DsCode = new SelectList(db.Districts, "DsCode", "DsName");
 ViewBag.TnCode = new SelectList(db.Towns, "TnCode", "TnName");


I want to display Related Town List when I select District

means When I select 1 District from Dropdown list related Towns Should be display in town list how should I do that,can any one help??
Posted
Updated 28-Aug-13 18:49pm
v2

1 solution

 
Share this answer
 
Comments
priyankavm 4-Sep-13 7:49am    
thanks..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900