【发布时间】:2008-10-26 07:27:51
【问题描述】:
我一直在等待某个时间来让我的 Asp.net Preview 4 项目达到标准,完全跳过 Preview 5 只是因为我知道我会遇到一些问题。
总之,问题和困境在这里。
我在网站上有几个区域,我有一个 ajax 更新类型面板,它使用此处找到的这种技术从视图呈现内容。 AJAX Panels with ASP.NET MVC
这在预览版 4 中运行良好,但现在在 Beta 版中,我不断收到这个 ..
Sys.ArgumentNullException: Value cannot be null Parameter name eventObject
它一直让我发疯......
我的代码是这样的
<% using (this.Ajax.BeginForm("ReportOne", "Reports", null, new AjaxOptions { UpdateTargetId = "panel1" }, new { id = "panelOneForm" })) { } %>
<div class="panel" id="panel1"><img src="/Content/ajax-loader.gif" /></div>
<script type="text/javascript">
$get("panelOneForm").onsubmit();
</script>
所以基本上它的作用是强制在表单上提交,它使用来自视图 ReportOne 的内容更新 panel1。
我错过了什么?为什么我会收到此错误?他们为什么要去改变事情?我喜欢 MVC,但这让我抓狂。
【问题讨论】:
标签: asp.net asp.net-mvc ajax