I have one JSON returning dropdown values (Value and Text). I need to load that data into my dropdown. I have no idea how can i load those data’s into dropdown. please tell me the possibilities.
Code
$('#SupplierId').change(function () {
var a = $(this).val();
$.post('@Url.Action("MatchPoNo", "Subscriptions")', { Id: a }, function (data) {
$("#PoNo").select2({
});
});
});
Try will work:
http://jsfiddle.net/SgCXy/
However it would be nice if you posted example of your json.