where does mvc stores the association between action method name and view page name? or who is responsible for checking if the there is a view page with name same as action method name?
+1
A:
You are the one who specifies the relation between the view and the action. By default, when you return View();
, ASP.NET MVC assumes that the view name is the same as the action name. You can, however, return View("About");
which will render the view page About.
There is no static checking -- the framework searches for the view at runtime. Therefore, the association is not stored anywhere.
Alexander Gyoshev
2010-05-05 06:12:00
Thanks for the answer.
Shetty
2010-05-06 04:30:55