Asp.net MVC - Render a partial View From an Area

前端 未结 3 2007
走了就别回头了
走了就别回头了 2021-01-12 21:34

I\'ve created an area that will handle our some generic things across all our development products, just as log ins, HTML helpers, etc. Inside the area, I have a partial vi

3条回答
  •  执笔经年
    2021-01-12 21:58

    I haven't actually had to do this, but at a guess I would assume you should use Html.RenderAction() instead, something like Html.RenderAction("action", "controller", new { area = "Area", model = ViewData.Model }).

    model will have to be replaced with the name of the action's parameters, but that should work.

    edit this will require a controller and view setup for each action though.

提交回复
热议问题