Programming Razor: Tools for Templates in ASP.NET MVC or WebMatrixTake 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.
|
Contents
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 |
Other editions - View all
Common terms and phrases
_Layout.cshtml _PageStart.cshtml templates Add Post ASP.NET MVC application ASP.NET MVC Razor ASP.NET MVC views blog posts code and markup code block code nugget compile contains content view controller CSHTML file custom base class database default Default.cshtml defined developers div>@post.Body</div Entity Framework errors example Facebook Figure folder structure foreach loop foreach(var post form post helper methods HomeController implement Index action install IntelliSense leverage logic Microsoft model keyword Model-View-Controller MSBuild MVC’s namespace nested layout NET Framework output Package Manager parameter parse partial view post data post in posts Post.cshtml Razor API Razor Helpers Razor layouts Razor markup Razor Single File Razor syntax Razor template Razor View Engine render RenderBody request server site’s snippet specify strongly-typed Template Engine Templated Delegate unit tests updated validation variable view’s ViewData Views folder Visual Basic NET Visual Studio web application Web Forms WebMatrix