林與Asp.net MVC3 relatevely新,ASP.NET AJAX.BeginForm發送多個請求
我有阿賈克斯處理的形式,像這樣:
@using(Ajax.BeginForm( 「dtjson」 ,新的AjaxOptions {HttpMethod =「Post」,UpdateTargetId =「detalle_tarifa」,OnSuccess =「exito2」,OnBegin =「bloquear」}))
我的問題是,當我提交數據時,它發送兩次請求。
讓我們看看視圖。
這是形式:
OK,現在的觀點後提交:
而這一次是要表明螢火蟲調試:
上的佈局,我有那些的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" [email protected]("~/Content/tinymce/jscripts/tiny_mce/jquery.tinymce.js")></script>
<script type="text/javascript" [email protected]("~/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 ...但我不知道它...
任何幫助將是偉大的,謝謝大家!
可以發佈哪些JavaScript文件包含在您的視圖/佈局? – nemesv
當然我已經做到了!我發現這可能是一個jQuery文件的問題.. – mleger45