So a few things to do/check.
Based on your comments and your code, I believe your issue as to why its not even hitting the controller is 2 things:
1) you are missing the [HttpPost] verb above your controller action.
[HttpPost]
public JsonResult getCustomerId(string CusName)
{
IQueryable CusID = from p in db.Persons where ((p.FName+p.LName) == CusName) select p.Id;
return Json(CusID, JsonRequestBehavior.AllowGet );
}
2) Your route and action use different variable names than your ajax call
Current calls data line:
data: { input: $("[id*='Customer'] :selected").text() },
Your action in your controller uses CusName for the parameter, yet in your route you specify it as name. Your issue here would be that CusName would be blank as the binding is looking to bind CusName parameter in your action to a form item being posted with a name of CusName, yet in your case you are passing it in as input.
You need to choose a parameter name and stick with it. If that is name, CusName, or input.
So in your ajax call's data line change it to this
data: { CusName: $("[id*='Customer'] :selected").text() },
Change your route to this as well. One item to note here, even though you aren't utilizing the route in your ajax call, if you were to start using this route in your ajax, i believe it won't work as what you currently have got due to the third param name being used, so you need to change your route to this:
routes.MapRoute(
"getCustomerId",
"Sale/People/{CusName}",
new { controller = "Sale", action = "getCustomerId" }
);