- A simple example of what Convention-Over-Configuration means is:
View files are often associated with an Action method(s) by means of a Naming Convention as opposed to being explicitly configured.
If the framework is requested to find the default view for an action called Index on a controller called HomeController, (if you don't specify a View name in the Action method) it will check the following four locations:
- ~/Views/Home/Index.aspx
- ~/Views/Home/Index.ascx
- ~/Views/Shared/Index.aspx
- ~/Views/Shared/Index.ascx
No comments:
Post a Comment