O'Reilly logo

Applied ASP.NET 4 in Context by Adam Freeman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding Razor

In the following sections, I'll show you the different types of Razor tag, and along the way, we'll add some new functionality to our view. As you read these sections, remember where the view sits in the MVC model. The MVC framework has passed a request to an action method in a controller, and the controller has done whatever it needs to the model and has called the View method to tell the MVC framework to render a view. The view will be used to generate an HTML page that will be returned to the user's browser.

To maintain our separation of concerns, we want to focus on creating a template that renders the HTML we require. We don't want to do any heavy computation (that's the job of the controller), and we don't want to hold ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required