我对 Asp.net MVC3 很陌生,
我有一个用 Ajax 处理的表单,如下所示:
@using (Ajax.BeginForm("dtjson", new AjaxOptions { HttpMethod = "Post", UpdateTargetId = "detalle_tarifa", OnSuccess = "exito2", OnBegin="bloquear" }))
我的问题是,当我提交数据时,它会发送两次请求。
让我们来看看景色。
这是表格:
好的,现在提交后的视图:
而这个是为了显示萤火虫调试:
在布局上,我有那些 javascript 文件..
<script src="@Url.Content("~/Scripts/jquery-ui.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.windows-engine.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.jqDock.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.jqDock.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.tablePagination.0.4.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.tools.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.cookie.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.treeview.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.treeview.edit.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
在视图(部分视图)上,我有这个:
<script src="@Url.Content("~/Scripts/jquery-1.4.4.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui.js")" type="text/javascript"></script>
<script type="text/javascript" src=@Url.Content("~/Content/tinymce/jscripts/tiny_mce/jquery.tinymce.js")></script>
<script type="text/javascript" src=@Url.Content("~/Content/tinymce/jscripts/tiny_mce/tiny_mce.js")></script>
<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
<script src="@Href("~/Scripts/jquery.uploadify.js")" type="text/javascript"></script>
<script src="@Href("~/Scripts/jquery.scrollTo.js")" type="text/javascript"></script>
<script src="@Href("~/Scripts/jquery.blockUI.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="/Scripts/jquery.cookie.js" type="text/javascript"></script>
<script src="/Scripts/jquery.treeview.js" type="text/javascript"></script>
<script src="/Scripts/jquery.treeview.edit.js" type="text/javascript"></script>
好像是jquery的问题……但我不确定……
任何帮助都会很棒,谢谢大家!