My asp.net-mvc view has an included javascript file. This javascript file has the following line:
$("input[id='SearchBag.CompanyName']").autocomplete("Search.mvc/AutoComplete/");
This works. Great. But it would be even better if I could replace the autocomplete's path with a generated URL so if I change the routing paths, I won't have to alter any code in my JS files. In non-included files I can go like
$("input[id='SearchBag.CompanyName']").autocomplete('<%=Url.Action("AutoComplete", "Search") %>)
But in included files this will not get parsed. Any ideas?