ASP.NET MVC tidbits found when browsing the code
Preview notice: This information is based on the first CTP of the MVC framework, the information from here will likely change in the next CTP’s
So last night I went digging into the code of the new MVC framework, fired up my Reflector and went to dig into the:
c:\Program Files\Reference Assemblies\Microsoft\Framework\ASP.NET 3.5 Extensions\System.Web.Extensions.dll
and the new System.Web.Mvc namespace.
So, here are a few tidbits found (hopefully this is only the first post about things like these in the framework):
(click for full size pic)
This basically says confirms that controllers must:
a) Be named ending with “Controller”
b) Implement IController (the base class implements it)
Another thing:

(click for full size)
And this basically says that for the default View Engine (ASP.NET one) Views (.aspx, .ascx, .master) must be located in:
a) /Views/[Somedirectory]/
b) /Views/Shared/
So you can’t throw them anywhere and expect it to work.
That’s it for the first post about tidbits, hope this helps someone.
Cheers!

Leave a Reply