小编Nil*_*Nil的帖子

如何通过操作结果从另一个局部视图更新局部视图

我对主视图有三个部分视图 像这样的东西

在第一个局部视图中我有搜索功能,当用户点击搜索时我想将结果刷新到第三个局部视图.

控制器:

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吗?

c# ajax asp.net-mvc partial-views asp.net-mvc-4

5
推荐指数
1
解决办法
7572
查看次数

标签 统计

ajax ×1

asp.net-mvc ×1

asp.net-mvc-4 ×1

c# ×1

partial-views ×1