我的控制器中有这段代码:
SomeController.cs
public PartialViewResult DoSomething()
{
...
List<MyItem> myList= populateList();
return PartialView(myList);
}
View.cshtml
@using (Ajax.BeginForm("DoSomething", "Some", new AjaxOptions
{
HttpMethod = "POST",
InsertionMode = InsertionMode.Replace,
UpdateTargetId = "resultFromDoSomething",
LoadingElementId = "waitingRequest"
}))
<div id="resultFromDoSomething"></div>
代码在Internet Explorer 9中运行正常,但在Firefox中,不是填充名为 resultFromDoSomething 的div,而是重定向到带有该视图的另一个页面。
我在这里做错了吗?
谢谢!