using this code in mvc
In view
$(function () {
//Dropdownlist Selectedchange event
$("#ContId").change(function () {
$.get("/Home/GetStateById", { ID: $("ContID").Val() }, function (data) {
$("#St").empty();
$.each(data, function (index, row) {
$("#St").append("
row.Statename + "");
// here we are adding option for States
});
})
});
});
but this is not working plz check this code there is an exception coming at this line .
$.get("/Home/GetStateById", { ID: $("ContID").Val() }, function (data) {

Salman BegRank #284 · 8.8K reputationPosted Dec 23, 2016, 8:16 AM EST
Amit Kumar SinghRank #562 · 4.3K reputationPosted Dec 23, 2016, 8:10 PM EST
Midhun TpRank #388 · 6.5K reputationPosted Dec 23, 2016, 8:50 PM EST
imran bhatti32 reputationPosted Dec 23, 2016, 9:05 PM EST
Amit Kumar SinghRank #562 · 4.3K reputationPosted Dec 23, 2016, 9:30 PM EST