I'm using ASP.NET MVC 4 and I'm trying to pass a value from my JavaScript to my Controller Action. Here's what I'm trying to do in my JavaScript :
function DoubleClick() {
debugger;
var id = 1;
$.ajax({
type: "POST",
url: "/Home/GetAppId",
data: { id: id}
});
}
And my action (really simple action) :
public JsonResult GetAppId(int id)
{
//some code will be included here
}
In my layout template, I'm including correctly my scripts (actually I'm using JS in some ohter pages and it works) :
<title>@ViewBag.Title</title>
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery.validate.globalize.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.js")" type="text/javascript"></script>
<link href="@Url.Content("~/Content/jquery-ui-1.10.4.custom.min.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery-ui-1.10.4.custom.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.ui.core.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.ui.datepicker.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/DatePickerReady.js")" type="text/javascript"></script>
When I'm opening the Chrome dev tool (F12), I'm seeing the following error message in the console tab :
Uncaught ReferenceError: jQuery is not defined
I can't really see where the problem is. Any idea?