I am trying to pass one extra perameter from ajax to controller action function with following ajax code
$('.search-box-text').autocomplete({
delay: 500,
minLength: 3,
//CitySearchAutoComplete
@*source: '@(Url.RouteUrl("ProductSearchAutoComplete"))',*@
source: '@(Url.RouteUrl("GetAllProductsName"))',
@*source: '@Url.Action("SearchTermAutoComplete", "Catelog")',*@
//appendTo: '.search-box',
extraParams: { city: 'new' },
select: function(event, ui) {
$('.search-box-text').val(ui.item.label);
return false;
}
});
and prototype of controller action iss as follows
public ActionResult GetAllProductsName(string term,string city)
in controller action term parameter is recieved as expected but city perameter is not recieving the value as expected.can any one please provide me the sollution for this issue.