Ajax.BeginForm results in redirect to partial view instead of in-place

前端 未结 2 1605
一向
一向 2021-01-22 12:42

My Search.cshtml has a div named \"search-results\" that is to be updated. SearchResults is the action name. I have done this many times on MVC2/VS2008 projects, but this is my

2条回答
  •  没有蜡笔的小新
    2021-01-22 13:13

    Ok, figured out my problem.

    I was calling Ajax.BeginForm with the AjaxOption OnSuccess pointint to a js function that updated my place holder. But this is not needed, with unobtrusive. Once I removed the OnSucces from the Ajax options everything started working.

    ~S

提交回复
热议问题