ASP.NET MVC tidbits found when browsing the code

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

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):

mvctidbits1

(click for full size pic)

mvctidbits2 

This basically says confirms that controllers must:

a) Be named ending with “Controller”

b) Implement IController (the base class implements it)

Another thing:

mvctidbits3

(click for full size)

mvctidbits4

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!


Filed under: ASP.NET MVC
Written on: 14 Dec 2007 ·

kick it on DotNetKicks.com

Leave a Reply