我相当新的
Asp.net MVC3,
我有一个使用Ajax处理的表单,像这样:
@using(Ajax.BeginForm(“dtjson”,new AjaxOptions {HttpMethod =“Post”,UpdateTargetId =“detalle_tarifa”,OnSuccess =“exito2”,OnBegin =“bloquear”}))
我的问题是,当我提交数据时,它会发送请求两次.
让我们来看看这个视图.
这是形式:
好的,现在提交后的视图:
而这一个是展示firebug调试:
在布局上,我有这些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的问题…但我不知道它…
任何帮助将是伟大的,谢谢大家!