I’m not quite sure I understand what Html.RenderAction() does. I’ve just noticed one weird behavior when using it:
In View/Contacts/Edit.aspx I used Html.RenderAction("ModalAddNote") which contains form for adding Notes for Contact. This is for ajax usage (it is opened in modal dialog).
Problem occurs when I create method ModalAddNote: now, when I submit page for editing Contact I am being redirected to Contacts/ModalAddNote and not to Contacts/Edit. If I delete Html.RenderAction("ModalAddNote") then it works fine. Why is that so and how to control it?
I found where the problem was… I had two
ModalAddNotemethods – one without and one withHttpPost, so when the page was submitted,Html.RenderAction("ModalAddNote")would call the one withHttpPostattribute