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
Would RenderPartial be an option for you?
More discussion on this topic can be found here: RenderAction calls wrong action method
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.
Since I know, there is not any solution for this problem out of the box. RenderAction and Action methods, consider the current request for deciding on to use which verb. But you can rename them. For example rename the one that is restricted to HttpPost to AddAccountNote and leave the other one with the current name and without specifying its verb.