Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have country,state,city cascading dropdown.
i use this link to complate this..

ASP.NET MVC Cascading Dropdown List[^]

insert time i have no problem but edit time state and city not get selected value.

may be because of this..


herestring.empty in dropdown so what i change here to get selected value + all list.

when i not click on country and direct click on state or city ...it's not get any thing.(edit time)

What I have tried:

@Html.DropDownList("State", new SelectList(string.Empty, "Value", "Text"), "select", new {@class = "dropdown1" }) 
Posted
Updated 29-Nov-17 17:26pm

1 solution

Try using this on your Edit View
C#
@Html.DropDownList("State", null, "select", new {@class = "dropdown1" })
 
Share this answer
 

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