This is the method I wanna call:
[AcceptVerbs(HttpVerbs.Post)]
public string MyPostMethod(int i)
{ ... }
I want to call it from another method in the same controller:
[AcceptVerbs(HttpVerbs.Get)]
public string MyOtherMethod(int i)
{ MyPostMethod(i); }
Is there a way to do this?
You should treat the controller methods as class methods .(A controller is just a class)
So would you do it for a class? If it is YES, you can do it for a controller too
Anyway, I would encapsulate the code in a private method and call it within the controller’s
methods.