How can I get Html.RenderAction to call the Get method on a Post?

前端 未结 1 1251
陌清茗
陌清茗 2021-01-12 06:53

After rendering a view on a Post, a call to RenderAction inside the view will call for the Post method. Is there any way to specify I want to call the Get method instead of

1条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-12 07:13

    It's not a separate request happening, so it's going to use the existing request context. You may want to differentiate the action by its name, and use the ChildActionOnly attribute to mark that action as only being available via RenderAction

    0 讨论(0)
提交回复
热议问题