Click here to Skip to main content
14,696,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a dropdownlist in my mvc application which is loaded when the page load but i dont wantto do that instead i want to click the dropdown and load entire data is it possoble?

What I have tried:

<script>
$("#countrySelect").change($(document).ready(function () {
debugger;
$.get('Home/countrySelectList', function(data) {
console.log(data)
$.each(data, function(index, value) {
$('<option>').val(value).text(value).appendTo("#countrySelect");
});
});
}));
</script>
Posted
Updated 25-Oct-16 7:03am

1 solution

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