Click here to Skip to main content
16,011,870 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Actually what i want to do is when i create another clone of the div my autocomplete jquery doesnt work?


@Html.DropDownList("Deep", (IEnumerable<SelectListItem>)ViewBag.Address, "", new { @class = "combobox" })


what can be done in order to make that possible?
Thanks in advance
Posted

1 solution

I don't think you can have two elements with the same id. Create two ids and tie them both to autocomplete in your code. You need different ids to look the two values up anyhow, and you should aim to create a viewmodel and use DropDownListFor, unless you're using AJAX to pass the selected values back ( which still means you need to tell them apart )
 
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