Is this the proper way to reference a controller from this jquery?
$.get("@Url.Action("Json_OrderTypes", "Order")", function (data) {
vs.
$.get("../Order/Json_OrderTypes", function (data) {
Is this the proper way to reference a controller from this jquery?
$.get("@Url.Action("Json_OrderTypes", "Order")", function (data) {
vs.
$.get("../Order/Json_OrderTypes", function (data) {
Yes, the first way is preferred. Some folks like to keep virtually all JavaScript that they can in separate files. If that's the case you can do something slightly different, which stores the values and initialized javascript objects with the values. The purists will do this 100% javascript free and use data- attributes (and other means) also discussed there but for ex
do you write your JavaScript in a ASP.NET MVC view
<div class="text-widget"
data-options="@Json.Encode(new { url = Url.Action("Update", "Text", new { id = 3 }), uselessParam = true })">
<input type="text" />
</div>