<div>
@Html.DropDownList("Mobiledropdown2",ViewBag.VBMobileList as SelectList,"Selectitem")
<select id = "state" Style ="width:100px;">
</select>
</div>
<script type ="text/javascript">
$("Mobiledropdown2").change(function(){
var selectedvalue =$(this).val();
if(selectedvalue != "Selectitem"){
$.ajax({
url: '@url.Action("GETdistrict","dis")',
tpye:'post',
data:{"seletedvalue": Seletedvalue},
datatype :'jason',
success: function (response){
var items ="";
$.each(reponse.ld.function (i,item) {
items += "<option value =\ "" + item + " \">" +item + " </option>";
}) ;
$("#Mobiledropdown2").html(items);
},
errors: function(error) {
}
});
}
else {
$("#Mobiledropdown2").empty();
}
-------------------------------------- Line 10: if(selectedvalue != "Selectitem"){
Line 11: $.ajax({
Line 12: url: '@url.Action("GETdistrict","dis")', // error on this line
Line 13: tpye:'post',
Line 14: data:{"seletedvalue": Seletedvalue},