11 August 2014

Rules to remember while creating MVC - Controller's action method

1. Action methods must be public
2. Action methods can't be static
3. Action methods can be overloaded
4. Action methods can't be overridden
5. All Controllers are inherited from Controller class, which has it's own action methods. New controller's action method can't have same action method name that parent class has.
6. Action method parameters can't be 'ref' or 'out'.
7. Actions can't be extension methods.
7. All actions are invoked by 'Get' request.

No comments:

Post a Comment