Wednesday, November 23, 2011

MVC3 app_code directory

I just found out from K. Scott Allen’s MVC3 training video on Pluralsight that the app_code directory in MVC3 is alive and well. Basically the Razor helpers here are pre-compiled and can be accessed globally in the application.

Apparently the usage in a Razor page is as follows:

    @Common.Script(“myscript.js”, Url)


Note to self: compare and contrast with shared “editor” partial views.

Note: I composed this post with Windows Live Writer 2011 but it doesn’t seem to play well with Blogger’s own editor. ¡QuĂ© pena!