minLength: 4,
autoFocus: true ,
source: function (request,response) {
$.ajax({
url: ' @Url.Action( "Autocomplete" , "File" ) ' ,
dataType: "json" ,
data: { term: request.term },
success: function (data) {
response($.map(data, function (item) {
return { label: item.Region, value: item.RegionID };
}))
}
})
},
select: function (event, ui) {
$( "#txtValue" ).val(ui.item.value);
$( "#lblName" ).val(ui.item.label);
return false ;
}
});