I wonder mapping mechanism from controllers to views. I can not understand how mapping can be possible If we just return value of View() method. Controller class’s View() method call overloaded View method with null parameters. But how can be possible to mapping to views with none specified returning value of View() method ?
I wonder mapping mechanism from controllers to views. I can not understand how mapping
Share
The controller knows the action that is being invoked and by convention if you don’t specify a view name it will look in
Views/ControllerName/ActionName.aspx(.ascx) for a corresponding view. If it doesn’t find it will show you a list of searched locations.Here are more details about how it works:
/ControllerName/ActionNameControllerNameControllerexists.Controllerin all referenced assemblies and those types are cached.