How can I get Html.RenderAction to call the Get me

2020-03-14 07:28发布

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 the Post?

1条回答
贼婆χ
2楼-- · 2020-03-14 07:48

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

查看更多
登录 后发表回答