在第一个局部视图中我有搜索功能,当用户点击搜索时我想将结果刷新到第三个局部视图.
控制器:
public ActionResult Search()
{
virtualmodel vm = new virtualmodel();
return PartialView(svm);
}
[HttpPost]
public ActionResult Search(ViewModel svm)
{
// Query to retrive the result
// I am not sure what to return from here. Link to another action or just return back to same same partial
}
public ActionResult AnotherPartialPartial()
{
}
Run Code Online (Sandbox Code Playgroud)
在主要观点
@{Html.RenderAction("Search", "Searchc");
}
Run Code Online (Sandbox Code Playgroud)
怎么做?我需要ajax吗?