Programming Razor: Tools for Templates in ASP.NET MVC or WebMatrix

Front Cover
"O'Reilly Media, Inc.", Sep 9, 2011 - Computers - 120 pages

Take Razor for a test drive and discover first hand how this scripting syntax simplifies the way you create dynamic, data-driven websites. With this concise guide, you’ll work with Razor syntax by building example websites with Microsoft WebMatrix and ASP.NET MVC. You'll quickly learn how Razor lets you combine code and content in a fluid and expressive manner on Windows-based servers.

Programming Razor also explores components of the Razor API, and shows you how Razor templates are turned into rendered HTML. By the end of this book, you'll be able to create Razor-based websites with custom extensions that meet the specific needs of your projects.

  • Use Razor with Microsoft WebMatrix to build a working blog, complete with data
  • Organize and manage your web application, using Razor features for layouts, sections, and partial views
  • Create clean and effective ASP.NET MVC views with the Razor View Engine
  • Learn how the Razor API interprets Razor templates and turns them into executable .NET code
  • Implement advanced techniques for exposing reusable code and sharing ASP.NET MVC views across projects
 

Contents

Chapter 1 Introduction
1
Chapter 2 Razor and Microsoft WebMatrix
11
Chapter 3 Organizing Razor Templates
27
Chapter 4 Razor and ASPNET MVC
51
Chapter 5 The Razor API
75
Chapter 6 Advanced Techniques
83
Chapter 7 Conclusion
99
Copyright

Other editions - View all

Common terms and phrases

Bibliographic information