Am having the AJAX calls to my controller in my MVC Application
Controller/FunctionName
$.ajax({
type: \"GET\",
contentType: \"application/jso
Just a complement of Darin's answer that if "the AJAX call is in a separate javascript file where you cannot use server side helpers", use a hidden field to store the url endpoint in the view:
@Html.Hidden("URLEndpointName", Url.Action("FunctionName", "Controller"))
and read that hidden field in your js:
url: $("#URLEndpointName").val(),