When you add a new controller to your project, ASP.NET automatically loads that controller for you and makes it ready for use. Here are some pointers that you may want to know so that you don't get stuck, or if you want to create a new project and have all your controllers in there:
- Your controller needs to end with the word Controller.
- Make sure your class is public; needless to say, interfaces and abstract classes will not work. Inherit them from the Microsoft controller class.
- You cannot have the same controller name in different namespaces. ASP.NET allows multiple namespaces for the same controller but both controllers will not be resolved. Best practice is to have unique names for your controllers.