Limit search to available items
Book Cover
E-book
Author Chadwick, Jess

Title Programming Razor / Jess Chadwick
Published Sebastopol, CA : O'Reilly, ©2011

Copies

Description 1 online resource (xiii, 99 pages) : illustrations
Contents Table of Contents; Preface; RazorPad: A Lightweight Razor Editor; Conventions Used in This Book; Using Code Examples; Safari® Books Online; How to Contact Us; Chapter 1. Introduction; A Brief History of Microsoft's Web Development Platforms; Active Server Pages (ASP); ASP.NET Web Forms; ASP.NET MVC; WebMatrix; Hello, Razor!; Differentiating Code and Markup; Code Nuggets; Code Blocks; How Razor Parses Markup and Code; Disambiguating Code and Markup; Explicit code nuggets; The @: character sequence; The block; Comments; Chapter 2. Razor and Microsoft WebMatrix; Introducing ASP.NET Web Pages
Installing WebMatrixYour First WebMatrix Website; The File List View; Website Administration; Hello World, Razor Style; Data Access with WebMatrix; Creating a Database; Populating the Database with Data; Displaying Data from the Database; Creating the Add Post page; Handling Posted Form Data; Saving Data to the Database; Validating Posted Data; Conversion helpers; Using validation; Creating the Home Page; Chapter 3. Organizing Razor Templates; Layouts; Layouts Are Pages, Too!; Sections; IsSectionDefined; Nested Layouts; Nested Layouts and Sections; Redefining Sections
The Layout Rendering Life CycleNested Layouts; Partial Views; Creating Partial Views; Accessing parameter values; Reusing Partial Views; Razor Helpers; Razor Helper Packages; Razor Helpers versus Partial Views; Razor Helpers; Partial Views; Executing Common Code; Executing Code the First Time a Page Executes; Executing Code Every Time a Page Executes; Wrapping Views with _PageStart.cshtml Logic; Executing Multiple _PageStart.cshtml Templates; Chapter 4. Razor and ASP.NET MVC; Installing ASP.NET MVC; The Model-View-Controller Architecture; ASP.NET MVC View Engines; The Razor View Engine
Differentiating Razor syntax and API implementationsImplementing a Blog Site Using ASP.NET MVC; The Model; The Controller; Data access with Entity Framework code first; Convention versus Configuration; Authoring ASP.NET MVC Views with the Razor Syntax; Adding Razor Views to an ASP.NET MVC Application; Writing ASP.NET MVC Razor View Markup; Strongly-Typed Views; Changing the Base Class; Applying Custom Base Classes to Multiple Views; Layouts and Content Pages; Razor View File Locations; Controller Views; Locating Razor Views; Shared Views; Views in ASP.NET MVC Areas
Html and Url Helper ClassesASP.NET MVC's Razor View Page Rendering Life Cycle; Precompiling Razor Views; Precompiling Razor Views in an ASP.NET MVC application; Compiling views from MSBuild; Chapter 5. The Razor API; Razor Templates: From Markup to .NET Code; 1. Parse the Razor Template; 2. Generate .NET Code; 3. Compile Generated Code into an Executable Class; 4. Instantiate and Execute the Generated Class; Meet the Players; Configuring the Razor Template Engine; Creating a RazorEngineHost; Creating the RazorTemplateEngine; Compiling Razor Templates; Executing a Razor Template
Summary Annotation 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, youll 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 dataOrganize and manage your web application, using Razor features for layouts, sections, and partial viewsCreate clean and effective ASP.NET MVC views with the Razor View EngineLearn how the Razor API interprets Razor templates and turns them into executable .NET codeImplement advanced techniques for exposing reusable code and sharing ASP.NET MVC views across projects
Notes Online resource; title from title screen (Safari, viewed Dec. 5, 2011)
SUBJECT Active server pages. http://id.loc.gov/authorities/names/n98026190
Microsoft .NET Framework. http://id.loc.gov/authorities/names/n2017043838
Active server pages. blmlsh
Active server pages fast
Microsoft .NET Framework fast
Subject Web site development.
Web sites -- Authoring programs.
COMPUTERS -- Digital Media -- General.
COMPUTERS -- Interactive & Multimedia.
COMPUTERS -- Web -- Site Design.
COMPUTERS -- Web -- User Generated Content.
Web site development
Web sites -- Authoring programs
Form Electronic book
ISBN 1449306764
9781449306762
9781449317553
1449317553
9781449317164
1449317162
9781449312824
1449312829