See the question and my original answer on StackOverflow

In the MVC pattern, M is the Model, C is the Controller, and V is the View. So, quite naturally, in the ASP.NET MVC model, there is the concept of a View Engine. Razor is simply one of the View Engines provided. The other one provided out-of-the-box is the "old" WebForms one (you can also write your own View Engine by the way). So Razor does not have the notion of code-behind which stays within the WebForms view engine boundaries.

So this kinda says it all. Razor handles the View part of MVC (If you choose to use it instead of the WebForms one). It has nothing to do with M or C.

Personally, I would definitely go for the Razor View Engine if you choose the ASP.NET MVC pattern, or use plain WebForms without MVC, as Razor has been designed to be less verbose, more simple to use than the Webforms one. It's also simply more recent so it tries to be ... simply better :-)

As a side note, the Razor Parser can also be used outside of ASP.NET MVC. It's implemented in an assembly that does not rely on MVC nor Web assemblies at all. See here for more on this: