代码之家  ›  专栏  ›  技术社区  ›  Mathias F

RenderAction的行为需要根据所包含的页面而有所不同

  •  2
  • Mathias F  · 技术社区  · 16 年前

    查找人员

     <%Html.RenderAction("FindPerson ", "People"); %>
    

    1 回复  |  直到 5 年前
        1
  •  2
  •   eu-ge-ne    16 年前

    <% Html.RenderAction("FindPerson ", "People", new { next = Url.Action("ActOnPerson", "HireController") }); %>
    
    <!-- or -->
    
    <% Html.RenderAction("FindPerson ", "People", new { nextaction = "ActOnPerson", nextcontroller = "HireController" }); %>
    

    <form method="post" action="<%= ViewData["next"].ToString() %>">
    
    <!-- or -->
    
    <% using (Html.BeginForm(
        ViewData["nextaction"].ToString(), ViewData["nextcontroller"].ToString() ) { %>