i see the convention is to have the post action be the same name as the page but to put a:
[AcceptsVerb.HTTPVerbs.Post]
on the action method.
Is there anything wrong with have the post action be another name.
So if i have a page called Edit, the Edit action will display that page, while the “Update”action will post the edit changes. This seems clearer to me as compared to having the Edit “Get” and the Edit “Post”
wanted to get peoples thoughts on this if this is purely a convention thing or is there a right and wrong here?
I believe it’s purely convention and there is nothing wrong with having different post action names.
The MVC default is to return a view with the same name as the action and the assumption is that you will want to return the same view whether you’re getting or posting.
Also, changing the action name generally changes the URL, but if you don’t care about that then go nuts with your action names.
I’ve used combinations of action names/purposes, depending on what seemed to make sense at the time.