Html.RenderAction uses Post instead of Get

前端 未结 3 947
我寻月下人不归
我寻月下人不归 2021-01-13 16:35

I have a simple form on my page. When submitted, it checks if ModelState.IsValid and returns the View with the same model if it\'s not valid.

On the sam

3条回答
  •  长情又很酷
    2021-01-13 17:21

    One solution would be to have only one AccountNote() action method. Then it will be called regardless of GET or POST. You might have to modify your logic a bit if you were using POST version of AccountNote().

    And you can decorate it with [ChildActionOnly] attribute.

提交回复
热议问题