SlideShare a Scribd company logo
Download Full Version ebook - Visit ebookmeta.com
ASP.NET Core Razor Pages in Action 1st Edition
Mike Brind
https://ebookmeta.com/product/asp-net-core-razor-pages-in-
action-1st-edition-mike-brind/
OR CLICK HERE
DOWLOAD NOW
Discover More Ebook - Explore Now at ebookmeta.com
Instant digital products (PDF, ePub, MOBI) ready for you
Download now and discover formats that fit your needs...
Start reading on any device today!
Beginning gRPC with ASP.NET Core 6: Build Applications
using ASP.NET Core Razor Pages, Angular, and Best
Practices in .NET 6 1st Edition Anthony Giretti
https://ebookmeta.com/product/beginning-grpc-with-asp-net-
core-6-build-applications-using-asp-net-core-razor-pages-angular-and-
best-practices-in-net-6-1st-edition-anthony-giretti/
ebookmeta.com
Pro ASP.NET Core 6: Develop Cloud-Ready Web Applications
Using MVC, Blazor, and Razor Pages 9th Edition Adam
Freeman
https://ebookmeta.com/product/pro-asp-net-core-6-develop-cloud-ready-
web-applications-using-mvc-blazor-and-razor-pages-9th-edition-adam-
freeman/
ebookmeta.com
ASP.NET Core in Action (MEAP V05) Andrew Lock
https://ebookmeta.com/product/asp-net-core-in-action-meap-v05-andrew-
lock/
ebookmeta.com
Ace Your Exam (Macmillan Study Skills) Northedge
https://ebookmeta.com/product/ace-your-exam-macmillan-study-skills-
northedge/
ebookmeta.com
Air Navigation As Per DGCA Syllabus For CPL ATPL ATC and
Flight Despatcher Courses 4th Edition R.K. Bali
https://ebookmeta.com/product/air-navigation-as-per-dgca-syllabus-for-
cpl-atpl-atc-and-flight-despatcher-courses-4th-edition-r-k-bali/
ebookmeta.com
For Your Own Good The more you gain the more you have to
lose 1st Edition Marie Reyes
https://ebookmeta.com/product/for-your-own-good-the-more-you-gain-the-
more-you-have-to-lose-1st-edition-marie-reyes/
ebookmeta.com
Sticky Sweet Filthy Dirty Summer 1st Edition Kat Baxter
https://ebookmeta.com/product/sticky-sweet-filthy-dirty-summer-1st-
edition-kat-baxter-2/
ebookmeta.com
Managing IT Projects: How to Pragmatically Deliver
Projects for External Customers 1st Edition Marcin
D■browski
https://ebookmeta.com/product/managing-it-projects-how-to-
pragmatically-deliver-projects-for-external-customers-1st-edition-
marcin-dabrowski-2/
ebookmeta.com
Saint s Passage 1st Edition Elizabeth Hunter
https://ebookmeta.com/product/saint-s-passage-1st-edition-elizabeth-
hunter/
ebookmeta.com
Matlab A Practical Introduction to Programming and Problem
Solving 6th Edition Stormy Attaway
https://ebookmeta.com/product/matlab-a-practical-introduction-to-
programming-and-problem-solving-6th-edition-stormy-attaway/
ebookmeta.com
ASP.NET Core Razor Pages in Action 1st Edition Mike Brind All Chapters Instant Download
inside front cover
ASP.NET Core Razor Pages in Action 1st Edition Mike Brind All Chapters Instant Download
ASP.NET Core Razor Pages in
Action
MIKE BRIND
To comment go to liveBook
Manning
Shelter Island
For more information on this and other Manning titles go to
www.manning.com
Copyright
For online information and ordering of these and other
Manning books, please visit www.manning.com. The
publisher offers discounts on these books when ordered in
quantity.
For more information, please contact
Special Sales Department
Manning Publications Co.
20 Baldwin Road
PO Box 761
Shelter Island, NY 11964
Email: orders@manning.com
©2023 by Manning Publications Co. All rights
reserved.
No part of this publication may be reproduced, stored in a
retrieval system, or transmitted, in any form or by means
electronic, mechanical, photocopying, or otherwise, without
prior written permission of the publisher.
Many of the designations used by manufacturers and sellers
to distinguish their products are claimed as trademarks.
Where those designations appear in the book, and Manning
Publications was aware of a trademark claim, the
designations have been printed in initial caps or all caps.
♾ Recognizing the importance of preserving what has been
written, it is Manning’s policy to have the books we publish
printed on acid-free paper, and we exert our best efforts to
that end. Recognizing also our responsibility to conserve the
resources of our planet, Manning books are printed on
paper that is at least 15 percent recycled and processed
without the use of elemental chlorine.
Manning Publications Co.
20 Baldwin Road Technical
PO Box 761
Shelter Island, NY 11964
Development editor: Toni Arritola
Technical development editor: Adriana Sabo
Review editor: Tanya Wilke
Production editor: Deirdre Hiam
Copy editor: Christian Berk
Proofreader: Katie Tennant
Technical proofreader: Filip Wojcieszyn
Typesetter: Gordan Salinović
Cover designer: Marija Tudor
ISBN: 9781617299988
contents
front matter
preface
acknowledgments
about this book
about the author
about the cover illustration
1 Getting started with Razor Pages
1.1 What is Razor Pages?
Web development frameworks
Server-side frameworks
Cross-platform functionality
Open source
Using your existing knowledge
1.2 What can you do with Razor Pages?
1.3 The technologies that underpin Razor Pages
The ASP.NET Core MVC framework
Model-view-controller
The design goals of Razor Pages
1.4 When should you use Razor Pages?
1.5 Working with Razor Pages
How do you get Razor Pages?
Choosing a development environment
Choosing a database system
2 Building your first application
2.1 Creating your first website
Creating a website using Visual Studio
Creating a website using the command-line interface
Running the application
Adding a new page
Modifying to include dynamic content
Adding the page to the navigation
2.2 Exploring the project files
The WebApplication1.sln file
The WebApplication1.csproj file
The bin and obj folders
The Properties folder
The wwwroot folder
The Pages folder
The app-settings files
Program.cs
2.3 Understanding middleware
An HTTP refresher
The HttpContext
The application request pipeline
Creating middleware
Middleware classes
3 Working with Razor Pages
3.1 Working with Razor syntax
Directives and code blocks
Rendering HTML with expressions
Control blocks in Razor
Rendering literal strings
Rendering literal HTML
3.2 Layout pages
Assigning the Layout property
Injecting optional content with sections
3.3 Reusable HTML with partial views, tag helpers, and view
components
Partial views
Tag helpers
View components
3.4 The PageModel
Passing data to pages
The PageModel as a view model
The PageModel as a controller
4 Matching URLs to Razor Pages with routing
4.1 Routing basics
Route templates
4.2 Customizing route templates
Overriding routes
Route parameters
Binding route data to handler parameters
Catchall parameters
Route constraints
Creating additional routes
Working with PageRouteModel conventions directly
4.3 Generating URLs
The anchor tag helper
Using the IUrlHelper to generate URLs
Generating redirect URLs from ActionResults
Customizing URL generation
Using parameter transformers to customize route and parameter value
generation
5 Working with forms: Model binding
5.1 Forms basics
Using the post-redirect-get pattern
Accessing values from Request.Form
Accessing values from Request.Query
5.2 Model binding
Using model binding with handler parameters
Using model binding with public properties
Binding complex objects
Binding simple collections
Binding complex collections
5.3 Validating user input in Razor Pages
DataAnnotation attributes
Client-side validation
Server-side validation
Managing more complex validation with ModelState
Custom validation attributes
6 Working with forms: Tag helpers
6.1 The form and form action tag helpers
6.2 Input and label tag helpers
Understanding the input types
Using data annotation attributes to control presentation
Formatting the rendered date or time value
Using the DisplayAttribute to control labels
6.3 The select tag helper
Creating options
Binding multiple values
Working with OptGroups
Binding enumerations
6.4 Check boxes and radio controls
6.5 Uploading files
7 Using dependency injection to manage services
7.1 The reason for dependency injection
Single-responsibility principle
Loose coupling
Dependency inversion
Dependency injection
7.2 Inversion of control containers
Service registration
Service lifetimes
Captive dependencies
Other service registration options
Registering multiple implementations
7.3 Other ways to access registered services
View injection
Method injection
Directly from the service container with GetService and
GetRequiredService
8 Working with data
8.1 What is Entity Framework Core?
Why choose EF Core?
How does EF Core work?
Managing relationships
Installing Entity Framework Core
Create the context
Adding DbSets
Configuring the model
8.2 Migrations
Seed data
Adding migration tools
Creating and applying a migration
8.3 Querying data
Retrieving multiple records
Selecting single records
8.4 Scaffolding CRUD pages
Visual Studio scaffold instructions
Scaffolding from the command line
Working with the scaffolded pages
8.5 Creating, modifying, and deleting data
Modifying data
Deleting data
9 Managing users with authentication
9.1 Authentication basics
How authentication works
Adding simple authentication
9.2 ASP.NET Core Identity
Creating a user
Configuring the DbContext
Adding migration
9.3 Customizing Identity
Customizing Identity options
Customizing the user
Scaffolding and customizing the UI
Enabling email confirmation
Disabling UI features
10 Controlling access with authorization
10.1 Basic authorization in Razor Pages
Applying simple authorization
Allowing anonymous access
10.2 Working with roles
Viewing roles
Adding roles
Assigning roles to users
Using policies to apply role checks
10.3 Claims-based authorization
Adding claims to users
Using policies to enforce claims-based authorization
Using assertions for more complex requirements
Custom authorization requirements and handlers
Roles or claims?
10.4 Authorizing resources
Creating a requirement and a handler
Applying authorization to the UI
11 Client-side technologies and AJAX
11.1 Choosing your client-side technology
11.2 Calling page handlers from JavaScript
Using a partial page to return HTML
Posting to a page handler
Working with JsonResult
11.3 Minimal request-handling APIs
An example minimal API
Parameters in minimal APIs
Minimal API return types
11.4 CSS Isolation in Razor Pages
12 Troubleshooting your application
12.1 Exception management
The Developer Exception page
ExceptionHandlerMiddleware
12.2 StatusCodePages
Exploring WithRedirects
StatusCodePages WithReExecute
12.3 Logging
Logging basics
Log levels
Log categories
Using EventIds
Formatting the log message
Applying log filter rules
Custom email logger
Structured logging with Serilog
13 Protecting your application against external attacks
13.1 HTTPS
SSL/TLS certificates
Using HTTPS in development
Including HSTS in production
13.2 Broken access control
Incorrect security policies
Cross-site request forgery
13.3 Cryptographic failures
Plain-text passwords
Using the PasswordHasher without Identity UI
13.4 Injection attacks
SQL injection
Cross-site scripting
14 Configuring and publishing your application
14.1 Working with environments
Understanding and managing environments
Setting the environment
Registering services conditionally for each environment
The IHostEnvironment service
The environment tag helper
14.2 Application configuration
appSettings.json
Accessing configuration settings programmatically by key
Strongly typed app settings
Using the options pattern
Binding directly to POCOs
Environments
14.3 Improving performance with caching
The cache tag helper
In-memory caching with IMemoryCache
14.4 Publishing your application
Self-contained and framework-dependent
Publishing using the CLI
Publishing using Visual Studio
index
front matter
preface
In the beginning, there was Active Server Pages (ASP)—a
page-focused web development framework from Microsoft
that enabled developers to build interactive web
applications that could process form submissions and
communicate with databases. The development model was
a simple one: each page in a website was represented by a
single file, which had a name and path that shared a one-
to-one mapping with the URL for the page. Each file
consisted of a mixture of HTML and a scripting language
that executed on the web server to generate more HTML.
However, as the complexity of an individual page grew, so
did its content—often resulting in difficult-to-maintain
spaghetti code. Scripting languages lacked any type
checking, which easily led to the introduction of bugs that
were only discovered at run time.
Then came ASP.NET Web Forms—another page-focused web
development framework. By supporting the strongly typed
C# and VB.NET languages, Web Forms offered compile-time
code checking, resulting in fewer bugs finding their way to
the production server. It also offered a separation between
the page’s presentation and its behavior with the
introduction of the code-behind file, reducing the amount of
spaghetti code. On the downside, basic HTTP technologies
were abstracted away by the Web Forms development
experience, which tried to emulate that of VB6 desktop
application developers. The UI was composed of server
controls, which the developer could drag and drop onto a
design surface. These controls were responsible for
generating HTML, which wasn’t always accessible or
standards compliant, and they provided few opportunities
for customizing their output.
In an attempt to appeal to Windows developers, Web Forms
introduced a large number of concepts to web development
totally unique to the framework. While Web Forms is
undeniably a hugely powerful framework, its high learning
curve makes it a difficult starting point for anyone new to
web development.
ASP.NET MVC was introduced in 2008, partly to provide a
more natural web development experience, and as a result,
it very quickly gained traction among intermediate and
experienced ASP.NET web developers as well as developers
more accustomed to using competing technologies, such as
Ruby on Rails and Java Spring. ASP.NET MVC was also
designed to solve several other problems advanced
developers have with Web Forms, including a lack of
testability, a need for clearer separation of concerns, the
ability to extend the framework, and so on. A notable
problem MVC did not solve, however, was making learning
ASP.NET any easier; if anything, the MVC framework’s
concept count was higher than that of Web Forms. But the
traditional mapping between filenames and URLs was just
one casualty. Developers also had to consider the names of
controller classes and their methods when building URLs as
well as the names of view templates, which had to be
placed in a specific location.
Microsoft attempted to solve the high barrier to entry for
beginner developers by introducing another page-focused
framework: ASP.NET Web Pages. This new framework
restored the easy-to-reason-about one-to-one mapping
between filenames and URLs. While it undoubtedly offered a
simpler learning experience, Web Pages reintroduced the
same issues ASP suffered from. A heavy reliance on the
dynamic type resulted in a loss of strong typing in key parts
of the framework, and the development model encouraged
mixing application logic and HTML in the same file. It should
be no surprise, therefore, that only the MVC framework was
retained when ASP.NET was initially rewritten from the
ground up for the new cross-platform .NET Core framework.
Razor Pages was introduced as part of ASP.NET Core 2.0,
with a set of specific aims. Chief among them was to make
working with dynamic HTML and forms with ASP.NET Core
easier by reducing the number of files and concepts
required to print Hello World in a page or build a CRUD
form. It was built on top of the existing MVC framework,
and it manages to retain all the useful features that make
MVC so powerful and flexible. Microsoft recommends
starting with Razor Pages for all new web development that
involves generating the UI on the server (see
https://docs.microsoft.com/en-
us/aspnet/core/tutorials/choose-web-ui).
I am all for things that make my life easier, which is why I
champion the Razor Pages framework. I hope reading this
book will make your life easier too.
acknowledgments
I’d like to thank my wife, Anna, for her patience and
understanding (once again), while I wrote this book. I’d also
like to thank a number of people at Manning, starting with
Brian Sawyer for reaching out in the first place. I’d also like
to thank the relay of developmental editors I worked with—
in particular Toni Arritola for seeing this project across the
line. Thanks also go to technical development editor Tanya
Wilke, for checking code as the book was being written, and
Filip Wojcieszyn, for acting as technical proofreader and
sharing his subject matter expertise to make the final result
better than it otherwise would have been. Thank you to all
those at Manning: Deirdre Hiam, my project manager;
Christian Berk, my copy editor; and Katie Tennant, my
proofreader. I would also like to thank all the MEAP
customers and reviewers for their invaluable contributions:
Charles Lam, Chris Thomas, Foster Haines, Harry Polder, Jiří
Činčura, Joe Cuevas, Karl Anderson. Karthikeyarajan
Rajendran, Lakshminarayanan AS, Lee Cottrell, Luigi
Zambetti, Marc Roulleau, Marek Petak, Markus Wolff,
Maytham Fahmi, Michael Holmes, Mitchell Fox, Oliver
Korten, Paul Brown, Richard Vaughan, Sadhana
Ganapathiraju, Stephen Byrne, Tiklu Ganguly, Timo
Salomäki, Tom Gueth, Wes Shaddix, Owain Williams, and
Mike Baran.
about this book
ASP.NET Core Razor Pages in Action focuses on one part of
the ASP.NET Core framework, Razor Pages, and how you
can use it to build dynamic web applications. As you go
through the book, you will build an increasingly complex
application that features some of the functionality you
might find in an online portal that allows users to book
short vacations in cities around the world. Each chapter
focuses on one of the core areas within Razor Pages,
building on what has been learned in the previous chapters.
Who should read this book
This book is intended for anyone who wants to learn how to
build basic or complex web applications using Microsoft
technologies as simply as possible. The book focuses on the
main features of the Razor Pages framework and assumes
you already have some knowledge of core web
technologies, such as HTML, CSS, JavaScript, and HTTP.
None of these are covered in any great detail in this book,
although I review one or two aspects of these fundamental
technologies where appropriate. I also assume you have a
familiarity with the C# language or similar. The examples in
this book have been kept as simple as possible, so if you
are currently learning C#, you should be able to follow
along. The book also touches on the use of relational
databases, so knowledge of these is also beneficial.
How this book is organized
The content of this book is spread over 14 chapters. The
chapters are designed to be read sequentially, as each one
builds on the teachings in the previous chapters:
Chapter 1 introduces Razor Pages and explains what
you can and can’t do with the framework. It also
discusses the technologies that underpin Razor Pages
and where you can obtain the framework.
Chapter 2 takes a first look at building applications with
Razor Pages using prepared project templates. The
chapter analyzes the generated files and explains the
role of each one. Finally, the chapter provides an in-
depth look at the request pipeline and how to use it to
control the behavior of your application.
Chapter 3 explores working with the page files in a
Razor Pages application. It begins with an overview of
the Razor templating syntax before moving on to look
at how to use it to generate HTML.
Chapter 4 explains how URLs are matched to files on
disk via a process called routing. It also looks at some
of the ways routing can be customized and when this
might be useful.
Chapter 5 focuses on leveraging model binding to
manage form submissions in a strongly typed manner
and how to validate form data.
Chapter 6 looks at the use of tag helpers as an
important part of building robust forms.
Chapter 7 explores the dependency injection feature in
Razor Pages, discussing why you need it and how you
should use it.
Chapter 8 introduces the use of Entity Framework Core
for managing data in a Razor Pages application.
Chapter 9 looks at managing authentication (knowing
who your user is) within a Razor Pages application,
primarily leveraging the ASP.NET Core Identity package
for this task.
Chapter 10 covers authorization within a Razor Pages
application—that is, restricting what your user can do.
Chapter 11 explores how to work with some new
features aimed at simplifying some client-side
technologies, such as CSS isolation, AJAX, JSON, and
minimal APIs.
Chapter 12 focuses on techniques for troubleshooting
your application, including how to use logging to record
and identify issues.
Chapter 13 covers your application’s security and how
to protect it against a range of the most common
external threats.
Chapter 14 looks at configuring your application to run
in different environments. It also covers using caching
to improve performance before finally publishing your
application.
About the code
This book contains many examples of source code both in
numbered listings and in line with normal text. In both
cases, source code is formatted in a fixed-width font
like this to separate it from ordinary text. Sometimes
code is also in bold to highlight code that has changed
from previous steps in the chapter, such as when a new
feature adds to an existing line of code.
In many cases, the original source code has been
reformatted; we’ve added line breaks and reworked
indentation to accommodate the available page space in the
book. In some cases, even this was not enough, and listings
include line-continuation markers (➥). Code annotations
accompany many of the listings, highlighting important
concepts.
You can get executable snippets of code from the liveBook
(online) version of this book at
https://livebook.manning.com/book/razor-pages-in-
action/welcome/v-10/. The complete code for the examples
in the book is available for download from the Manning
website at https://www.manning.com/books/asp-net-core-
razor-pages-in-action, and from GitHub at
https://github.com/mikebrind/Razor-Pages-In-Action.
liveBook discussion forum
Purchase of ASP.NET Core Razor Pages in Action includes
free access to liveBook, Manning’s online reading platform.
Using liveBook’s exclusive discussion features, you can
attach comments to the book globally or to specific sections
or paragraphs. It’s a snap to make notes for yourself, ask
and answer technical questions, and receive help from the
author and other users. To access the forum, go to
https://livebook.manning.com/book/razor-pages-in-
action/welcome/v-10/discussion. You can also learn more
about Manning’s forums and the rules of conduct at
https://livebook.manning.com/discussion.
Manning’s commitment to our readers is to provide a venue
where a meaningful dialogue between individual readers
and between readers and the author can take place. It is
not a commitment to any specific amount of participation on
the part of the author, whose contribution to the forum
remains voluntary (and unpaid). We suggest you try asking
him some challenging questions lest his interest stray! The
forum and the archives of previous discussions will be
accessible from the publisher’s website as long as the book
is in print.
about the author
Mike Brind has been developing web applications using
Microsoft technologies since 2004, starting with classic ASP,
before moving on to the Web Forms framework, and then to
MVC and ASP.NET Web Pages. These days Mike works
mainly with ASP.NET Core, focusing on Razor Pages. He has
blogged extensively about the Razor Pages framework at
https://www.mikesdotnetting.com and maintains a tutorial
site dedicated to Razor Pages at
https://www.learnrazorpages.com. Mike is an 11-time
recipient of the Microsoft Most Valuable Professional (MVP)
award for his community contributions in sharing his
knowledge of ASP.NET.
about the cover illustration
The figure on the cover of ASP.NET Core Razor Pages in
Action is “Femme de l’Isle de Nootka,” or “Woman of Nootka
Island,” taken from a collection by Jacques Grasset de
Saint-Sauveur, published in 1797. Each illustration is finely
drawn and colored by hand.
In those days, it was easy to identify where people lived
and what their trade or station in life was just by their
dress. Manning celebrates the inventiveness and initiative of
the computer business with book covers based on the rich
diversity of regional culture centuries ago, brought back to
life by pictures from collections such as this one.
Discovering Diverse Content Through
Random Scribd Documents
ASP.NET Core Razor Pages in Action 1st Edition Mike Brind All Chapters Instant Download
ASP.NET Core Razor Pages in Action 1st Edition Mike Brind All Chapters Instant Download
ASP.NET Core Razor Pages in Action 1st Edition Mike Brind All Chapters Instant Download
The Project Gutenberg eBook of Underneath
the Bough: A Book of Verses
This ebook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this ebook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.
Title: Underneath the Bough: A Book of Verses
Author: George Allan England
Release date: December 7, 2019 [eBook #60870]
Language: English
Credits: Produced by Tim Lindell, David E. Brown, and the
Online
Distributed Proofreading Team at http://www.pgdp.net
(This
file was produced from images generously made
available
by The Internet Archive/American Libraries.)
*** START OF THE PROJECT GUTENBERG EBOOK UNDERNEATH
THE BOUGH: A BOOK OF VERSES ***
AUTOGRAPH EDITION
Printed for subscribers only
This Copy is
No. ___________
UNDERNEATH THE BOUGH
ASP.NET Core Razor Pages in Action 1st Edition Mike Brind All Chapters Instant Download
UNDERNEATH
THE BOUGH
A BOOK OF VERSES
By
GEORGE ALLAN ENGLAND
THE GRAFTON PRESS
NEW YORK
Copyright, 1903, by
GEORGE ALLAN ENGLAND
This little book is offered to
AGNES
its inspirer, in this the tenth year
of her reign.
I desire to express my sincere thanks to Dr. Titus Munson Coan, Mr.
Justo Quintéro and Mr. A. B. Myrick for assistance rendered, and to
acknowledge the kind permission to reprint certain of these verses
given me by The Literary Digest, Harvard Illustrated Magazine,
Vogue, Middletown Forum, Red Letter, Literary Review, Boston
Transcript, Town Topics, Smart Set, The New York Herald and other
periodicals.
G. A. E.
CONTENTS.
PAGE.
I. The Race of the Mighty 1
II. Songs & Sonnets.
Love Beatified 9
Morning, Noon and Night 10
Dante 11
Love’s Blindness 12
Hesperides 13
My Garden 18
Erinnerungen 19
The Battle Royal 20
España 21
Love’s Fear 22
Longings 23
Horace, IV, 8 24
Ricordatevi Di Me! 26
The Tower 28
Love’s Prayer 30
Combien J’ai Douce Souvenance 31
My Little Red Devil and I 33
The College Pump 37
I Disputanti 38
Quand Vous Serez Bien Vieille 39
One Summer Night 40
A Une Fleurette 42
Blest Be the Day 43
Mignonne Allons Voir Si La Rose 44
Religion 45
The Great Woods Were Awakening 46
I-N-R-I 47
Fayre Robyn 48
Coeur de Femme 51
III. Ballades & Rondeaux
Ballade of the Sick 54
Three Rondeaux from Charles d’Orléans 56
The Song of the Poor 59
Kyrielle 62
Rondeau 64
When I First Saw Edmée 65
My Old Coat 66
A Pantoum 68
When Doris Deigns 70
IV. The Year
Spring—May Evening 72
Summer—August Rain 73
Autumn—November in Cambridge 74
Winter—Hampton Holidays 75
V. Mors Omnium Victor
Gunga Din in Hell 78
Cui Bono? 79
The Bride-Bed 80
Dead Loves 81
Death the Friend 82
La Jeune Fille 83
Lucie 84
Luctus in Morte Passeris 89
Death in December 90
The Royal Council 92
Carmen Mortis 93
THE RACE OF THE MIGHTY
The Race of the Mighty[A]
T
THE START
HE appointed time at length the dials show.
“Attention, both!... Now, are you ready?... Go!!”
The chauffeur grips his lever with a hand
Of steel.—A leap!—A flash of wheels! A grand
And supple beast-like spring!—A growl of gear!
As, sweeping through the multitudinous sea
Of men upraising full-voiced cheer on cheer,
He whirls away to promised victory!...
ON THE ROAD
The high road stretches straight and white
Away
To dreamy distance, on and on—
The day
Dawns sharp and foggy; nips the driver’s
Nose,
Despite his costly furs. Zounds! How
It blows!
The motor purrs!—Our mobile seems
To fly,
Nor touch the ground... (Pneumatic
Mystery!)
The motor purrs!—Farewell wood, field
And stream!
Once on the road, we’ve scanty time
To dream!
The motor purrs!—Look out! A sheer
Decline.
Temptation whispers: Faster here!
It’s fine!
Faster? It’s madness! Yes, I know!—
But on!
Full speed down hill! Another record
Full speed down hill! Another record
Gone!...
The driver plunges out of view...
See, there
He climbs the distant slope again.
I swear
He’d scale Olympus! Yet that course
Is clear
From many mishaps that beset
Us here!
We crush a curséd mongrel in
The dust!
Slow down to miss an English spinster,
Just
Graze by her on her clumsy, ancient
Wheel!—
Rout ducks and chickens, set the pigs
A-squeal!
It’s not our fault! We can’t be kept
All day
To clear the road!... Speed on!—Away!
Away!...
THE STRUGGLE
But hark!... Behind, a trumpet-blast winds clear!
Great God! Our dread competitor draws near;
We’d half a minute start, and now, like Fate,
He’s rushing onward to annihilate
Distance and time, whirled in a hurricane!
Inexorably we see him gain and gain....
“Now!—speed her up!” the boy cries out. “More speed!”
“The curséd motor’s gone to sleep!—Indeed,
“We’re hardly doing fifty miles an hour.
“But he won’t pass us yet awhile! More power!”...
Th d i h d h th f i
The driver heeds; he moves—the furious pace
Grows frenzied! Oh, the glory of a race
Like this of modern days, with steady hand
To steer a whirlwind through a startled land!
THE WATCHERS
“The first is near!—Let no one cross!—Take care!
“See! There they are!—Look out! The horn! Beware!
“Stand back!—They’re two!... It’s Girardot! No, no;
“It’s Charron! No, it’s Levegh!—How they blow
“That horn!”... But who can hope to recognize
Or name the shrilling bullet in its flight?
And what are names when glory blinds the eyes?
The towns love sport, and cheer; but, half in fright
The laboring peasants stop their ploughs to see
This avalanche—this hurtling mystery!
THE FINISH
Untiring, on their mounts of fire and steel,
The shielded chauffeurs, watchful, hand on wheel,
Have flashed through many a league;—have breathed the dust
Of devious ways; have skirted wood and sea;
Have traversed towns, crossed rivers, hills and dales;—
Nor halted once! To learn geography
By such vast lessons, though it tire the flesh,
Exalts the soul and makes the spirit free.
But now must end this vast, Titanic race!
(It cannot last forever!)—See! The place
Lies there!... A broad, white banner bars the way,
Between two lofty poles with streamers gay.
The “FINISH” there we read. The end at last!
All rest and glory, once that goal is passed!
A final burst!—The driver grips the bar!
The “FINISH!” In the road he sees afar
A judge with solemn air attentive stand,
Waving a crimson kerchief in his hand...
“Stop!” Harshly grinds the brake—“What number’s this?”
“Your name?”
Recorded!
Apotheosis!!
SONGS & SONNETS
Love Beatified.
L OVE, slain by us and buried yesterday,
Rose up again, nor in his grave would stay.
On his earth-stainèd brow and sightless eyes
Still shone the splendours of our Paradise.
Hushed was each dissonance, every fault made clean,
And joys alone I saw, that might have been.
It never seemed our Love could shew so fair
As that dead Presence, shrined in glory there.
I would not have our Love to live again,
And blend each pleasure with his greater pain.—
Oh better far this blessèd death, and rest!
Dead Love I clasp, I cherish to my breast
And ever shall, for this I know is best!
Morning, Noon and Night.
I LOVE thee when the gates of eastern light
Are opened by the Morning-star, aflame;
I love thee when the rose-red heavens proclaim
The coming of their lord, to mortal sight,
And cloudless, when from his imperial height
He looks in glory down. I breathe thy name
With thoughts of love, when drowsy Noon the same
Poised, equal distance holds, twixt dawn and night.
I love thee when the West begins to glow,
And when the restless winds lie still in heaven;
I love thee when the deep’ning shadows fall,
As comes with Tyrian dye, soft, purple even;
But when, from out the waters, rises slow
The noiseless Night, I love thee best of all.
Dante.
THOU’RT but a pensive, dreaming Boy, when first
To thy sad eyne the sight of Love appears
With blessèd Beatrice. Nine circling years
Name thee the wounded Lover, whose sweet thirst
Is never sated, nor whose fever less.
At Campaldino thou’rt the mailèd Knight;
Savage to spur thy City on toward right
Thou’rt driven, its scape-goat, to the wilderness.
There, in the stranger’s house whose stairs are pain
To mount, whose bread is bitter to thy mouth,
Dawns thy Great Vision, mid thy soul’s last drouth;
And, past Hell’s flame and Purgatory’s round,
Greets thee thy love most gentle, once again,
Thou frowning Florentine with laurels crowned!
Love’s Blindness.
“O LOVE, my Love, thou canst not know how sweet,
How dear thou art!”—“Naught would I know, save this
That thou wilt ever yearn to share my kiss!
So being, I reck not whether years be fleet
Or endless!”—“But thou canst not see thy face
As others see thee! Thy deep eyes that greet
Their lucent-mirrored glimmerings, melt and meet
In glory there, to blind themselves a space!”
“Hush, O my heart! Thy vain hyperbole
Means naught; but take in both thy hands and turn
To thee this face of mine, and kiss my brow,
And after that mine eyes which cannot see
But only feel thy lips that thrill, and now
My mouth, and now—O God! thy kisses burn!”
Hesperides.
I
NOW once again the angry sun
Wheels up the heaven his tireless way;
Once more we strangling herds of men
Wake to our labours never-done,
Rise up to toil another day.
Down flares the heat on town and street,
Wide-warping pillar, span and plinth;
Once more my burning, wearied eyes
Within this monstrous labyrinth
Meet the mad heat that stifles me,
And O, my baffled spirit flies
In dreams to thy green wood and thee,
To thee!... To thee!...
II
My pavement-wearied feet again
Tread the rough streets whose ways are pain,
Hot with the sun’s last sullen beam,
And yet—I dream!
Dream when I wake, and at high, blinding Noon,
Or when the moon
Mocks the sad City in her sullen night
That burns too bright!
So sweet my visions seem
That from this sordid smoke and dust I turn,
Turn where the dim Wood-world calls out to me
And where the forest-virgins I half see
With green mysterious fingers beckoning!
Where vine-wreathed woodland altars sunlit burn,
Or Dryads weave their mystic rounds and sing,
Sing high, sing low, with magic cadences
That once the wild oaks of Dodona heard;
And every wood-note bids me burst asunder
The bonds that hold me from the leaf-hid bird!
I quaff thee, O Nepenthe! Ah, the wonder
Grows that there be who scorn not wealth and ease,
Who still will choose the street-life, rough and blurred,
Who will not quest you, O Hesperides!...
III
And now, and now... I feel the forest-moss!
O, on these moss-beds let me lie with Pan,
Twined with the ivy-vine in tendrilled curls!
And I will hold all gold that hampers man
But the base ashes of a barren dross!
On with the love-dance of the pagan girls!
The pagan girls with lips all rosy-red,
With breasts up-girt and foreheads garlanded!
With fair white foreheads nobly garlanded!
With sandalled feet that weave the magic ring
Now ... let them sing,
And I will pipe a song that all may hear,
To bid them mind the time of my wild rhyme!
Away! Away! Beware our mystic trees!
Who will not quest you, O Hesperides?...
IV
Great men of song, what sing ye? Woodland meadows?
Rocks, trees and rills where sunlight glints to gold?
Sing ye the hills adown whose sides blue shadows
Creep when the westering day is growing old?
Sing ye the brooks where in the purling shallows
The small fish dart and gleam?
Sing ye the pale green tresses of the willows
That stoop to kiss the stream?
Or sing ye burning streets and sweating toil
Where we spawned swarms of men, unendingly,
Above, below, in mart and workshop’s moil
Have quite forgot thee, O mine Arcady?...
My Garden.
With a copy of “Sonnets of this Century.”
THIS little book, a Garden where the bloom
And fragrance of an hundred years are pent,
To thee, dear girl, at Christmas-tide is sent
By one who breathes with love the sweet perfume
Of such frail flowers. Let aye the world consume
Itself with toil and labour—such are all
Without the bounds of this my garden-wall,
And I, in light, feel not nor heed their gloom.
Come thou into my Garden! Let me show
Thee all the treasures that do lend it grace,
These goodly Sonnets, standing in a row
To tell of joy, tears, love,—life’s madrigal;
And, mistress of the pure enchanted place,
Be thou the fairest Flower among them all!...
Erinnerungen.
SCHWER ist mein Herz, und heute kann ich nicht
Mehr lesen—kann nicht denken, leiden mehr.
Aus jeder Ecke kommt ein Schatten her,
Wie aus dem toten Himmel geht das Licht.
Ich sinn’ und sinn’—ich sehe ihn noch, wie er
Vor langen Jahren zartlich schaut’ mich an
Eh’ unsere reine Liebe erst begann
Langsam zu sterben, ich zu trauern sehr...
Schwer ist mein Herz. Aus seinen Ecken auch
Kriechen die Schatten, schnell und schneller. Jetzt
Vernimmt mein müdes Ohr den ersten Hauch
Der Winternacht ... Es glimmert Strom und Wald
In dunkler Ferne ... Dies vergeht zuletzt,
Und alles endlich finster ist und kalt...
The Battle Royal.
THOU Battle Royal! Kings and gentlemen
At arms, and lords have fought thee since the mists
Of time, back-rolling, show’d thy mimic lists
And pigmy warriors, mazed and harried then
As now in meshes of thy checkered strife—
Unshielded Pawns, trim Knights and frowning Rooks
Stolid yet quick, and Bishops smug, with looks
A-squint, and King with lame yet endless life.
Thou Battle Royal! Years unnumbered soil
Cards, draughts and dice with myriad grime-worn hands.
Thou, lov’d by dames and lords in all the lands
Of this broad world art still the world’s best play;
Where, as in life, whilst others struggle, toil,
And die, the imperious Queen controls the day!
España.
“Que era, decidme, la nación que un día
Reina del mundo proclamó el destino?...”
Quintana—Oda a España.
WHERE now that Nation proud which Destiny
Once did proclaim this world’s all conquering queen?
Where now that sceptre, that bright blazon seen
That mark’d her mistress over land and sea?
A lost emprise, a shattered galleon she,
Sails rent and hull agape that once have been
World-powerful; her rotting masts careen
With each dark surge of long-pent enmity.
On through sea’s salty wastes the tempests spurn,
The waves rebuff her; lights no more there gleam
Nor vergies wave on her high carven beam.
Stilled is the sailor’s jest, the skipper’s song;
In swirling fogs of night she drives along
With Helmsman Death stark-frozen at the stern!...
Love’s Fear.
V IRGIN art thou and pure, amid a throng
Of such sweet hallowed names as all men praise.
(Grown all too scant in these our latter days!)
To holy hours of old dost thou belong;
Saint Agnès then had heard thine even-song,
Nor left thee, darkling, in Earth’s devious ways.
Thou’rt one with that sweet sisterhood which raise
To “untouched Dian,” all clear streams along,
Their full-voiced anthem. Thou a Vestal art
At true-love’s altar. Atala, and the Maid,
And Mary all are sisters of thy blood!
Thy very name is virgin!... I, afraid,
How shall I press my kisses on thy heart,
Or loose the girdle of thy maidenhood?...

More Related Content

PDF
ASP.NET Core Razor Pages in Action 1st Edition Mike Brind
PDF
ASP.NET Core Razor Pages in Action 1st Edition Mike Brind
PDF
Blazor in Action 1st Edition Chris Sainty
PDF
Azure Infrastructure as Code: With ARM templates and Bicep 1st Edition Henry ...
PDF
Azure Infrastructure as Code: With ARM templates and Bicep 1st Edition Henry ...
PDF
Go Building Web Applications 1st Edition Nathan Kozyra Mat Ryer
PDF
Complete Download (Ebook) Go: Building Web Applications by Nathan Kozyra, M...
PDF
(Ebook) Go: Building Web Applications by Nathan Kozyra, Mat Ryer
ASP.NET Core Razor Pages in Action 1st Edition Mike Brind
ASP.NET Core Razor Pages in Action 1st Edition Mike Brind
Blazor in Action 1st Edition Chris Sainty
Azure Infrastructure as Code: With ARM templates and Bicep 1st Edition Henry ...
Azure Infrastructure as Code: With ARM templates and Bicep 1st Edition Henry ...
Go Building Web Applications 1st Edition Nathan Kozyra Mat Ryer
Complete Download (Ebook) Go: Building Web Applications by Nathan Kozyra, M...
(Ebook) Go: Building Web Applications by Nathan Kozyra, Mat Ryer

Similar to ASP.NET Core Razor Pages in Action 1st Edition Mike Brind All Chapters Instant Download (20)

PDF
(Ebook) Go: Building Web Applications by Nathan Kozyra, Mat Ryer
PDF
Cloud Native Spring In Action With Spring Boot And Kubernetes 1st Edition Tho...
PDF
ASP NET Core Security 1st Edition Christian Wenz
PDF
Rust Web Development With warp tokio and reqwest 1st Edition Bastian Gruber
PDF
Instant Access to Go Building Web Applications 1st Edition Nathan Kozyra Mat ...
PDF
Blazor in Action 1st Edition Chris Sainty
PDF
Dart Scalable Application Development Learning Path 1st Edition Davy Mitchell...
PDF
Getting MEAN with Mongo Express Angular and Node 1st Edition Simon Holmes
PDF
Dart Scalable Application Development Learning Path 1st Edition Davy Mitchell...
PDF
Go Building Web Applications 1st Edition Nathan Kozyra Mat Ryer download pdf
PDF
Download full ebook of Mastering NGINX Dimitri Aivaliotis instant download pdf
PDF
Download full Go Building Web Applications 1st Edition Nathan Kozyra Mat Ryer...
PDF
Getting MEAN with Mongo Express Angular and Node 1st Edition Simon Holmes
PDF
Web Development with Node and Express 2nd Edition Ethan Brown
PDF
Go Building Web Applications 1st Edition Nathan Kozyra Mat Ryer
PDF
Applied Elk Stack Data Insights And Business Metrics With Collective Capabili...
PDF
Complete Download Web Development with Node and Express 2nd Edition Ethan Bro...
PDF
(Ebook) JavaScript Application Design: A Build First Approach by Nicolas Be...
PDF
Third Party JavaScript 1st Edition Ben Vinegar
PDF
ASP NET Professional Projects 1st Edition Hersh Bhasin
(Ebook) Go: Building Web Applications by Nathan Kozyra, Mat Ryer
Cloud Native Spring In Action With Spring Boot And Kubernetes 1st Edition Tho...
ASP NET Core Security 1st Edition Christian Wenz
Rust Web Development With warp tokio and reqwest 1st Edition Bastian Gruber
Instant Access to Go Building Web Applications 1st Edition Nathan Kozyra Mat ...
Blazor in Action 1st Edition Chris Sainty
Dart Scalable Application Development Learning Path 1st Edition Davy Mitchell...
Getting MEAN with Mongo Express Angular and Node 1st Edition Simon Holmes
Dart Scalable Application Development Learning Path 1st Edition Davy Mitchell...
Go Building Web Applications 1st Edition Nathan Kozyra Mat Ryer download pdf
Download full ebook of Mastering NGINX Dimitri Aivaliotis instant download pdf
Download full Go Building Web Applications 1st Edition Nathan Kozyra Mat Ryer...
Getting MEAN with Mongo Express Angular and Node 1st Edition Simon Holmes
Web Development with Node and Express 2nd Edition Ethan Brown
Go Building Web Applications 1st Edition Nathan Kozyra Mat Ryer
Applied Elk Stack Data Insights And Business Metrics With Collective Capabili...
Complete Download Web Development with Node and Express 2nd Edition Ethan Bro...
(Ebook) JavaScript Application Design: A Build First Approach by Nicolas Be...
Third Party JavaScript 1st Edition Ben Vinegar
ASP NET Professional Projects 1st Edition Hersh Bhasin
Ad

Recently uploaded (20)

PDF
Basic Mud Logging Guide for educational purpose
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
RMMM.pdf make it easy to upload and study
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
Cell Types and Its function , kingdom of life
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Lesson notes of climatology university.
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Computing-Curriculum for Schools in Ghana
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
Institutional Correction lecture only . . .
PPTX
GDM (1) (1).pptx small presentation for students
PDF
TR - Agricultural Crops Production NC III.pdf
Basic Mud Logging Guide for educational purpose
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Supply Chain Operations Speaking Notes -ICLT Program
O7-L3 Supply Chain Operations - ICLT Program
RMMM.pdf make it easy to upload and study
Final Presentation General Medicine 03-08-2024.pptx
PPH.pptx obstetrics and gynecology in nursing
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Cell Types and Its function , kingdom of life
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Anesthesia in Laparoscopic Surgery in India
Lesson notes of climatology university.
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Computing-Curriculum for Schools in Ghana
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Institutional Correction lecture only . . .
GDM (1) (1).pptx small presentation for students
TR - Agricultural Crops Production NC III.pdf
Ad

ASP.NET Core Razor Pages in Action 1st Edition Mike Brind All Chapters Instant Download

  • 1. Download Full Version ebook - Visit ebookmeta.com ASP.NET Core Razor Pages in Action 1st Edition Mike Brind https://ebookmeta.com/product/asp-net-core-razor-pages-in- action-1st-edition-mike-brind/ OR CLICK HERE DOWLOAD NOW Discover More Ebook - Explore Now at ebookmeta.com
  • 2. Instant digital products (PDF, ePub, MOBI) ready for you Download now and discover formats that fit your needs... Start reading on any device today! Beginning gRPC with ASP.NET Core 6: Build Applications using ASP.NET Core Razor Pages, Angular, and Best Practices in .NET 6 1st Edition Anthony Giretti https://ebookmeta.com/product/beginning-grpc-with-asp-net- core-6-build-applications-using-asp-net-core-razor-pages-angular-and- best-practices-in-net-6-1st-edition-anthony-giretti/ ebookmeta.com Pro ASP.NET Core 6: Develop Cloud-Ready Web Applications Using MVC, Blazor, and Razor Pages 9th Edition Adam Freeman https://ebookmeta.com/product/pro-asp-net-core-6-develop-cloud-ready- web-applications-using-mvc-blazor-and-razor-pages-9th-edition-adam- freeman/ ebookmeta.com ASP.NET Core in Action (MEAP V05) Andrew Lock https://ebookmeta.com/product/asp-net-core-in-action-meap-v05-andrew- lock/ ebookmeta.com Ace Your Exam (Macmillan Study Skills) Northedge https://ebookmeta.com/product/ace-your-exam-macmillan-study-skills- northedge/ ebookmeta.com
  • 3. Air Navigation As Per DGCA Syllabus For CPL ATPL ATC and Flight Despatcher Courses 4th Edition R.K. Bali https://ebookmeta.com/product/air-navigation-as-per-dgca-syllabus-for- cpl-atpl-atc-and-flight-despatcher-courses-4th-edition-r-k-bali/ ebookmeta.com For Your Own Good The more you gain the more you have to lose 1st Edition Marie Reyes https://ebookmeta.com/product/for-your-own-good-the-more-you-gain-the- more-you-have-to-lose-1st-edition-marie-reyes/ ebookmeta.com Sticky Sweet Filthy Dirty Summer 1st Edition Kat Baxter https://ebookmeta.com/product/sticky-sweet-filthy-dirty-summer-1st- edition-kat-baxter-2/ ebookmeta.com Managing IT Projects: How to Pragmatically Deliver Projects for External Customers 1st Edition Marcin D■browski https://ebookmeta.com/product/managing-it-projects-how-to- pragmatically-deliver-projects-for-external-customers-1st-edition- marcin-dabrowski-2/ ebookmeta.com Saint s Passage 1st Edition Elizabeth Hunter https://ebookmeta.com/product/saint-s-passage-1st-edition-elizabeth- hunter/ ebookmeta.com
  • 4. Matlab A Practical Introduction to Programming and Problem Solving 6th Edition Stormy Attaway https://ebookmeta.com/product/matlab-a-practical-introduction-to- programming-and-problem-solving-6th-edition-stormy-attaway/ ebookmeta.com
  • 8. ASP.NET Core Razor Pages in Action MIKE BRIND To comment go to liveBook Manning Shelter Island
  • 9. For more information on this and other Manning titles go to www.manning.com
  • 10. Copyright For online information and ordering of these and other Manning books, please visit www.manning.com. The publisher offers discounts on these books when ordered in quantity. For more information, please contact Special Sales Department Manning Publications Co. 20 Baldwin Road PO Box 761 Shelter Island, NY 11964 Email: orders@manning.com ©2023 by Manning Publications Co. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps. ♾ Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books we publish printed on acid-free paper, and we exert our best efforts to
  • 11. that end. Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15 percent recycled and processed without the use of elemental chlorine. Manning Publications Co. 20 Baldwin Road Technical PO Box 761 Shelter Island, NY 11964 Development editor: Toni Arritola Technical development editor: Adriana Sabo Review editor: Tanya Wilke Production editor: Deirdre Hiam Copy editor: Christian Berk Proofreader: Katie Tennant Technical proofreader: Filip Wojcieszyn Typesetter: Gordan Salinović Cover designer: Marija Tudor ISBN: 9781617299988
  • 12. contents front matter preface acknowledgments about this book about the author about the cover illustration 1 Getting started with Razor Pages 1.1 What is Razor Pages? Web development frameworks Server-side frameworks Cross-platform functionality Open source Using your existing knowledge 1.2 What can you do with Razor Pages? 1.3 The technologies that underpin Razor Pages The ASP.NET Core MVC framework Model-view-controller The design goals of Razor Pages 1.4 When should you use Razor Pages? 1.5 Working with Razor Pages How do you get Razor Pages? Choosing a development environment Choosing a database system 2 Building your first application
  • 13. 2.1 Creating your first website Creating a website using Visual Studio Creating a website using the command-line interface Running the application Adding a new page Modifying to include dynamic content Adding the page to the navigation 2.2 Exploring the project files The WebApplication1.sln file The WebApplication1.csproj file The bin and obj folders The Properties folder The wwwroot folder The Pages folder The app-settings files Program.cs 2.3 Understanding middleware An HTTP refresher The HttpContext The application request pipeline Creating middleware Middleware classes 3 Working with Razor Pages
  • 14. 3.1 Working with Razor syntax Directives and code blocks Rendering HTML with expressions Control blocks in Razor Rendering literal strings Rendering literal HTML 3.2 Layout pages Assigning the Layout property Injecting optional content with sections 3.3 Reusable HTML with partial views, tag helpers, and view components Partial views Tag helpers View components 3.4 The PageModel Passing data to pages The PageModel as a view model The PageModel as a controller 4 Matching URLs to Razor Pages with routing
  • 15. 4.1 Routing basics Route templates 4.2 Customizing route templates Overriding routes Route parameters Binding route data to handler parameters Catchall parameters Route constraints Creating additional routes Working with PageRouteModel conventions directly 4.3 Generating URLs The anchor tag helper Using the IUrlHelper to generate URLs Generating redirect URLs from ActionResults Customizing URL generation Using parameter transformers to customize route and parameter value generation 5 Working with forms: Model binding
  • 16. 5.1 Forms basics Using the post-redirect-get pattern Accessing values from Request.Form Accessing values from Request.Query 5.2 Model binding Using model binding with handler parameters Using model binding with public properties Binding complex objects Binding simple collections Binding complex collections 5.3 Validating user input in Razor Pages DataAnnotation attributes Client-side validation Server-side validation Managing more complex validation with ModelState Custom validation attributes 6 Working with forms: Tag helpers
  • 17. 6.1 The form and form action tag helpers 6.2 Input and label tag helpers Understanding the input types Using data annotation attributes to control presentation Formatting the rendered date or time value Using the DisplayAttribute to control labels 6.3 The select tag helper Creating options Binding multiple values Working with OptGroups Binding enumerations 6.4 Check boxes and radio controls 6.5 Uploading files 7 Using dependency injection to manage services
  • 18. 7.1 The reason for dependency injection Single-responsibility principle Loose coupling Dependency inversion Dependency injection 7.2 Inversion of control containers Service registration Service lifetimes Captive dependencies Other service registration options Registering multiple implementations 7.3 Other ways to access registered services View injection Method injection Directly from the service container with GetService and GetRequiredService 8 Working with data
  • 19. 8.1 What is Entity Framework Core? Why choose EF Core? How does EF Core work? Managing relationships Installing Entity Framework Core Create the context Adding DbSets Configuring the model 8.2 Migrations Seed data Adding migration tools Creating and applying a migration 8.3 Querying data Retrieving multiple records Selecting single records 8.4 Scaffolding CRUD pages Visual Studio scaffold instructions Scaffolding from the command line Working with the scaffolded pages 8.5 Creating, modifying, and deleting data Modifying data Deleting data 9 Managing users with authentication
  • 20. 9.1 Authentication basics How authentication works Adding simple authentication 9.2 ASP.NET Core Identity Creating a user Configuring the DbContext Adding migration 9.3 Customizing Identity Customizing Identity options Customizing the user Scaffolding and customizing the UI Enabling email confirmation Disabling UI features 10 Controlling access with authorization
  • 21. 10.1 Basic authorization in Razor Pages Applying simple authorization Allowing anonymous access 10.2 Working with roles Viewing roles Adding roles Assigning roles to users Using policies to apply role checks 10.3 Claims-based authorization Adding claims to users Using policies to enforce claims-based authorization Using assertions for more complex requirements Custom authorization requirements and handlers Roles or claims? 10.4 Authorizing resources Creating a requirement and a handler Applying authorization to the UI 11 Client-side technologies and AJAX
  • 22. 11.1 Choosing your client-side technology 11.2 Calling page handlers from JavaScript Using a partial page to return HTML Posting to a page handler Working with JsonResult 11.3 Minimal request-handling APIs An example minimal API Parameters in minimal APIs Minimal API return types 11.4 CSS Isolation in Razor Pages 12 Troubleshooting your application 12.1 Exception management The Developer Exception page ExceptionHandlerMiddleware 12.2 StatusCodePages Exploring WithRedirects StatusCodePages WithReExecute 12.3 Logging Logging basics Log levels Log categories Using EventIds Formatting the log message Applying log filter rules Custom email logger Structured logging with Serilog 13 Protecting your application against external attacks
  • 23. 13.1 HTTPS SSL/TLS certificates Using HTTPS in development Including HSTS in production 13.2 Broken access control Incorrect security policies Cross-site request forgery 13.3 Cryptographic failures Plain-text passwords Using the PasswordHasher without Identity UI 13.4 Injection attacks SQL injection Cross-site scripting 14 Configuring and publishing your application
  • 24. 14.1 Working with environments Understanding and managing environments Setting the environment Registering services conditionally for each environment The IHostEnvironment service The environment tag helper 14.2 Application configuration appSettings.json Accessing configuration settings programmatically by key Strongly typed app settings Using the options pattern Binding directly to POCOs Environments 14.3 Improving performance with caching The cache tag helper In-memory caching with IMemoryCache 14.4 Publishing your application Self-contained and framework-dependent Publishing using the CLI Publishing using Visual Studio index
  • 25. front matter preface In the beginning, there was Active Server Pages (ASP)—a page-focused web development framework from Microsoft that enabled developers to build interactive web applications that could process form submissions and communicate with databases. The development model was a simple one: each page in a website was represented by a single file, which had a name and path that shared a one- to-one mapping with the URL for the page. Each file consisted of a mixture of HTML and a scripting language that executed on the web server to generate more HTML. However, as the complexity of an individual page grew, so did its content—often resulting in difficult-to-maintain spaghetti code. Scripting languages lacked any type checking, which easily led to the introduction of bugs that were only discovered at run time. Then came ASP.NET Web Forms—another page-focused web development framework. By supporting the strongly typed C# and VB.NET languages, Web Forms offered compile-time code checking, resulting in fewer bugs finding their way to the production server. It also offered a separation between the page’s presentation and its behavior with the introduction of the code-behind file, reducing the amount of spaghetti code. On the downside, basic HTTP technologies
  • 26. were abstracted away by the Web Forms development experience, which tried to emulate that of VB6 desktop application developers. The UI was composed of server controls, which the developer could drag and drop onto a design surface. These controls were responsible for generating HTML, which wasn’t always accessible or standards compliant, and they provided few opportunities for customizing their output. In an attempt to appeal to Windows developers, Web Forms introduced a large number of concepts to web development totally unique to the framework. While Web Forms is undeniably a hugely powerful framework, its high learning curve makes it a difficult starting point for anyone new to web development. ASP.NET MVC was introduced in 2008, partly to provide a more natural web development experience, and as a result, it very quickly gained traction among intermediate and experienced ASP.NET web developers as well as developers more accustomed to using competing technologies, such as Ruby on Rails and Java Spring. ASP.NET MVC was also designed to solve several other problems advanced developers have with Web Forms, including a lack of testability, a need for clearer separation of concerns, the ability to extend the framework, and so on. A notable problem MVC did not solve, however, was making learning ASP.NET any easier; if anything, the MVC framework’s concept count was higher than that of Web Forms. But the traditional mapping between filenames and URLs was just one casualty. Developers also had to consider the names of
  • 27. controller classes and their methods when building URLs as well as the names of view templates, which had to be placed in a specific location. Microsoft attempted to solve the high barrier to entry for beginner developers by introducing another page-focused framework: ASP.NET Web Pages. This new framework restored the easy-to-reason-about one-to-one mapping between filenames and URLs. While it undoubtedly offered a simpler learning experience, Web Pages reintroduced the same issues ASP suffered from. A heavy reliance on the dynamic type resulted in a loss of strong typing in key parts of the framework, and the development model encouraged mixing application logic and HTML in the same file. It should be no surprise, therefore, that only the MVC framework was retained when ASP.NET was initially rewritten from the ground up for the new cross-platform .NET Core framework. Razor Pages was introduced as part of ASP.NET Core 2.0, with a set of specific aims. Chief among them was to make working with dynamic HTML and forms with ASP.NET Core easier by reducing the number of files and concepts required to print Hello World in a page or build a CRUD form. It was built on top of the existing MVC framework, and it manages to retain all the useful features that make MVC so powerful and flexible. Microsoft recommends starting with Razor Pages for all new web development that involves generating the UI on the server (see https://docs.microsoft.com/en- us/aspnet/core/tutorials/choose-web-ui).
  • 28. I am all for things that make my life easier, which is why I champion the Razor Pages framework. I hope reading this book will make your life easier too. acknowledgments I’d like to thank my wife, Anna, for her patience and understanding (once again), while I wrote this book. I’d also like to thank a number of people at Manning, starting with Brian Sawyer for reaching out in the first place. I’d also like to thank the relay of developmental editors I worked with— in particular Toni Arritola for seeing this project across the line. Thanks also go to technical development editor Tanya Wilke, for checking code as the book was being written, and Filip Wojcieszyn, for acting as technical proofreader and sharing his subject matter expertise to make the final result better than it otherwise would have been. Thank you to all those at Manning: Deirdre Hiam, my project manager; Christian Berk, my copy editor; and Katie Tennant, my proofreader. I would also like to thank all the MEAP customers and reviewers for their invaluable contributions: Charles Lam, Chris Thomas, Foster Haines, Harry Polder, Jiří Činčura, Joe Cuevas, Karl Anderson. Karthikeyarajan Rajendran, Lakshminarayanan AS, Lee Cottrell, Luigi Zambetti, Marc Roulleau, Marek Petak, Markus Wolff, Maytham Fahmi, Michael Holmes, Mitchell Fox, Oliver Korten, Paul Brown, Richard Vaughan, Sadhana Ganapathiraju, Stephen Byrne, Tiklu Ganguly, Timo Salomäki, Tom Gueth, Wes Shaddix, Owain Williams, and Mike Baran.
  • 29. about this book ASP.NET Core Razor Pages in Action focuses on one part of the ASP.NET Core framework, Razor Pages, and how you can use it to build dynamic web applications. As you go through the book, you will build an increasingly complex application that features some of the functionality you might find in an online portal that allows users to book short vacations in cities around the world. Each chapter focuses on one of the core areas within Razor Pages, building on what has been learned in the previous chapters. Who should read this book This book is intended for anyone who wants to learn how to build basic or complex web applications using Microsoft technologies as simply as possible. The book focuses on the main features of the Razor Pages framework and assumes you already have some knowledge of core web technologies, such as HTML, CSS, JavaScript, and HTTP. None of these are covered in any great detail in this book, although I review one or two aspects of these fundamental technologies where appropriate. I also assume you have a familiarity with the C# language or similar. The examples in this book have been kept as simple as possible, so if you are currently learning C#, you should be able to follow along. The book also touches on the use of relational databases, so knowledge of these is also beneficial.
  • 30. How this book is organized The content of this book is spread over 14 chapters. The chapters are designed to be read sequentially, as each one builds on the teachings in the previous chapters: Chapter 1 introduces Razor Pages and explains what you can and can’t do with the framework. It also discusses the technologies that underpin Razor Pages and where you can obtain the framework. Chapter 2 takes a first look at building applications with Razor Pages using prepared project templates. The chapter analyzes the generated files and explains the role of each one. Finally, the chapter provides an in- depth look at the request pipeline and how to use it to control the behavior of your application. Chapter 3 explores working with the page files in a Razor Pages application. It begins with an overview of the Razor templating syntax before moving on to look at how to use it to generate HTML. Chapter 4 explains how URLs are matched to files on disk via a process called routing. It also looks at some of the ways routing can be customized and when this might be useful. Chapter 5 focuses on leveraging model binding to manage form submissions in a strongly typed manner and how to validate form data. Chapter 6 looks at the use of tag helpers as an important part of building robust forms.
  • 31. Chapter 7 explores the dependency injection feature in Razor Pages, discussing why you need it and how you should use it. Chapter 8 introduces the use of Entity Framework Core for managing data in a Razor Pages application. Chapter 9 looks at managing authentication (knowing who your user is) within a Razor Pages application, primarily leveraging the ASP.NET Core Identity package for this task. Chapter 10 covers authorization within a Razor Pages application—that is, restricting what your user can do. Chapter 11 explores how to work with some new features aimed at simplifying some client-side technologies, such as CSS isolation, AJAX, JSON, and minimal APIs. Chapter 12 focuses on techniques for troubleshooting your application, including how to use logging to record and identify issues. Chapter 13 covers your application’s security and how to protect it against a range of the most common external threats. Chapter 14 looks at configuring your application to run in different environments. It also covers using caching to improve performance before finally publishing your application.
  • 32. About the code This book contains many examples of source code both in numbered listings and in line with normal text. In both cases, source code is formatted in a fixed-width font like this to separate it from ordinary text. Sometimes code is also in bold to highlight code that has changed from previous steps in the chapter, such as when a new feature adds to an existing line of code. In many cases, the original source code has been reformatted; we’ve added line breaks and reworked indentation to accommodate the available page space in the book. In some cases, even this was not enough, and listings include line-continuation markers (➥). Code annotations accompany many of the listings, highlighting important concepts. You can get executable snippets of code from the liveBook (online) version of this book at https://livebook.manning.com/book/razor-pages-in- action/welcome/v-10/. The complete code for the examples in the book is available for download from the Manning website at https://www.manning.com/books/asp-net-core- razor-pages-in-action, and from GitHub at https://github.com/mikebrind/Razor-Pages-In-Action. liveBook discussion forum Purchase of ASP.NET Core Razor Pages in Action includes free access to liveBook, Manning’s online reading platform.
  • 33. Using liveBook’s exclusive discussion features, you can attach comments to the book globally or to specific sections or paragraphs. It’s a snap to make notes for yourself, ask and answer technical questions, and receive help from the author and other users. To access the forum, go to https://livebook.manning.com/book/razor-pages-in- action/welcome/v-10/discussion. You can also learn more about Manning’s forums and the rules of conduct at https://livebook.manning.com/discussion. Manning’s commitment to our readers is to provide a venue where a meaningful dialogue between individual readers and between readers and the author can take place. It is not a commitment to any specific amount of participation on the part of the author, whose contribution to the forum remains voluntary (and unpaid). We suggest you try asking him some challenging questions lest his interest stray! The forum and the archives of previous discussions will be accessible from the publisher’s website as long as the book is in print. about the author Mike Brind has been developing web applications using Microsoft technologies since 2004, starting with classic ASP, before moving on to the Web Forms framework, and then to MVC and ASP.NET Web Pages. These days Mike works mainly with ASP.NET Core, focusing on Razor Pages. He has blogged extensively about the Razor Pages framework at https://www.mikesdotnetting.com and maintains a tutorial
  • 34. site dedicated to Razor Pages at https://www.learnrazorpages.com. Mike is an 11-time recipient of the Microsoft Most Valuable Professional (MVP) award for his community contributions in sharing his knowledge of ASP.NET. about the cover illustration The figure on the cover of ASP.NET Core Razor Pages in Action is “Femme de l’Isle de Nootka,” or “Woman of Nootka Island,” taken from a collection by Jacques Grasset de Saint-Sauveur, published in 1797. Each illustration is finely drawn and colored by hand. In those days, it was easy to identify where people lived and what their trade or station in life was just by their dress. Manning celebrates the inventiveness and initiative of the computer business with book covers based on the rich diversity of regional culture centuries ago, brought back to life by pictures from collections such as this one.
  • 35. Discovering Diverse Content Through Random Scribd Documents
  • 39. The Project Gutenberg eBook of Underneath the Bough: A Book of Verses
  • 40. This ebook is for the use of anyone anywhere in the United States and most other parts of the world at no cost and with almost no restrictions whatsoever. You may copy it, give it away or re-use it under the terms of the Project Gutenberg License included with this ebook or online at www.gutenberg.org. If you are not located in the United States, you will have to check the laws of the country where you are located before using this eBook. Title: Underneath the Bough: A Book of Verses Author: George Allan England Release date: December 7, 2019 [eBook #60870] Language: English Credits: Produced by Tim Lindell, David E. Brown, and the Online Distributed Proofreading Team at http://www.pgdp.net (This file was produced from images generously made available by The Internet Archive/American Libraries.) *** START OF THE PROJECT GUTENBERG EBOOK UNDERNEATH THE BOUGH: A BOOK OF VERSES ***
  • 41. AUTOGRAPH EDITION Printed for subscribers only This Copy is No. ___________ UNDERNEATH THE BOUGH
  • 43. UNDERNEATH THE BOUGH A BOOK OF VERSES By GEORGE ALLAN ENGLAND THE GRAFTON PRESS NEW YORK
  • 44. Copyright, 1903, by GEORGE ALLAN ENGLAND This little book is offered to AGNES its inspirer, in this the tenth year of her reign. I desire to express my sincere thanks to Dr. Titus Munson Coan, Mr. Justo Quintéro and Mr. A. B. Myrick for assistance rendered, and to acknowledge the kind permission to reprint certain of these verses given me by The Literary Digest, Harvard Illustrated Magazine, Vogue, Middletown Forum, Red Letter, Literary Review, Boston Transcript, Town Topics, Smart Set, The New York Herald and other periodicals. G. A. E.
  • 45. CONTENTS. PAGE. I. The Race of the Mighty 1 II. Songs & Sonnets. Love Beatified 9 Morning, Noon and Night 10 Dante 11 Love’s Blindness 12 Hesperides 13 My Garden 18 Erinnerungen 19 The Battle Royal 20 España 21 Love’s Fear 22 Longings 23 Horace, IV, 8 24 Ricordatevi Di Me! 26 The Tower 28 Love’s Prayer 30 Combien J’ai Douce Souvenance 31 My Little Red Devil and I 33 The College Pump 37 I Disputanti 38 Quand Vous Serez Bien Vieille 39 One Summer Night 40 A Une Fleurette 42 Blest Be the Day 43
  • 46. Mignonne Allons Voir Si La Rose 44 Religion 45 The Great Woods Were Awakening 46 I-N-R-I 47 Fayre Robyn 48 Coeur de Femme 51 III. Ballades & Rondeaux Ballade of the Sick 54 Three Rondeaux from Charles d’Orléans 56 The Song of the Poor 59 Kyrielle 62 Rondeau 64 When I First Saw Edmée 65 My Old Coat 66 A Pantoum 68 When Doris Deigns 70 IV. The Year Spring—May Evening 72 Summer—August Rain 73 Autumn—November in Cambridge 74 Winter—Hampton Holidays 75 V. Mors Omnium Victor Gunga Din in Hell 78 Cui Bono? 79 The Bride-Bed 80 Dead Loves 81 Death the Friend 82 La Jeune Fille 83 Lucie 84 Luctus in Morte Passeris 89
  • 47. Death in December 90 The Royal Council 92 Carmen Mortis 93
  • 48. THE RACE OF THE MIGHTY The Race of the Mighty[A]
  • 49. T THE START HE appointed time at length the dials show. “Attention, both!... Now, are you ready?... Go!!” The chauffeur grips his lever with a hand Of steel.—A leap!—A flash of wheels! A grand And supple beast-like spring!—A growl of gear! As, sweeping through the multitudinous sea Of men upraising full-voiced cheer on cheer, He whirls away to promised victory!... ON THE ROAD The high road stretches straight and white Away To dreamy distance, on and on— The day Dawns sharp and foggy; nips the driver’s Nose, Despite his costly furs. Zounds! How It blows! The motor purrs!—Our mobile seems To fly, Nor touch the ground... (Pneumatic Mystery!) The motor purrs!—Farewell wood, field And stream! Once on the road, we’ve scanty time To dream! The motor purrs!—Look out! A sheer Decline. Temptation whispers: Faster here! It’s fine! Faster? It’s madness! Yes, I know!— But on! Full speed down hill! Another record
  • 50. Full speed down hill! Another record Gone!... The driver plunges out of view... See, there He climbs the distant slope again. I swear He’d scale Olympus! Yet that course Is clear From many mishaps that beset Us here! We crush a curséd mongrel in The dust! Slow down to miss an English spinster, Just Graze by her on her clumsy, ancient Wheel!— Rout ducks and chickens, set the pigs A-squeal! It’s not our fault! We can’t be kept All day To clear the road!... Speed on!—Away! Away!... THE STRUGGLE But hark!... Behind, a trumpet-blast winds clear! Great God! Our dread competitor draws near; We’d half a minute start, and now, like Fate, He’s rushing onward to annihilate Distance and time, whirled in a hurricane! Inexorably we see him gain and gain.... “Now!—speed her up!” the boy cries out. “More speed!” “The curséd motor’s gone to sleep!—Indeed, “We’re hardly doing fifty miles an hour. “But he won’t pass us yet awhile! More power!”... Th d i h d h th f i
  • 51. The driver heeds; he moves—the furious pace Grows frenzied! Oh, the glory of a race Like this of modern days, with steady hand To steer a whirlwind through a startled land! THE WATCHERS “The first is near!—Let no one cross!—Take care! “See! There they are!—Look out! The horn! Beware! “Stand back!—They’re two!... It’s Girardot! No, no; “It’s Charron! No, it’s Levegh!—How they blow “That horn!”... But who can hope to recognize Or name the shrilling bullet in its flight? And what are names when glory blinds the eyes? The towns love sport, and cheer; but, half in fright The laboring peasants stop their ploughs to see This avalanche—this hurtling mystery! THE FINISH Untiring, on their mounts of fire and steel, The shielded chauffeurs, watchful, hand on wheel, Have flashed through many a league;—have breathed the dust Of devious ways; have skirted wood and sea; Have traversed towns, crossed rivers, hills and dales;— Nor halted once! To learn geography By such vast lessons, though it tire the flesh, Exalts the soul and makes the spirit free. But now must end this vast, Titanic race! (It cannot last forever!)—See! The place Lies there!... A broad, white banner bars the way, Between two lofty poles with streamers gay. The “FINISH” there we read. The end at last! All rest and glory, once that goal is passed! A final burst!—The driver grips the bar! The “FINISH!” In the road he sees afar A judge with solemn air attentive stand,
  • 52. Waving a crimson kerchief in his hand... “Stop!” Harshly grinds the brake—“What number’s this?” “Your name?” Recorded! Apotheosis!!
  • 54. Love Beatified. L OVE, slain by us and buried yesterday, Rose up again, nor in his grave would stay. On his earth-stainèd brow and sightless eyes Still shone the splendours of our Paradise. Hushed was each dissonance, every fault made clean, And joys alone I saw, that might have been. It never seemed our Love could shew so fair As that dead Presence, shrined in glory there. I would not have our Love to live again, And blend each pleasure with his greater pain.— Oh better far this blessèd death, and rest! Dead Love I clasp, I cherish to my breast And ever shall, for this I know is best!
  • 55. Morning, Noon and Night. I LOVE thee when the gates of eastern light Are opened by the Morning-star, aflame; I love thee when the rose-red heavens proclaim The coming of their lord, to mortal sight, And cloudless, when from his imperial height He looks in glory down. I breathe thy name With thoughts of love, when drowsy Noon the same Poised, equal distance holds, twixt dawn and night. I love thee when the West begins to glow, And when the restless winds lie still in heaven; I love thee when the deep’ning shadows fall, As comes with Tyrian dye, soft, purple even; But when, from out the waters, rises slow The noiseless Night, I love thee best of all.
  • 56. Dante. THOU’RT but a pensive, dreaming Boy, when first To thy sad eyne the sight of Love appears With blessèd Beatrice. Nine circling years Name thee the wounded Lover, whose sweet thirst Is never sated, nor whose fever less. At Campaldino thou’rt the mailèd Knight; Savage to spur thy City on toward right Thou’rt driven, its scape-goat, to the wilderness. There, in the stranger’s house whose stairs are pain To mount, whose bread is bitter to thy mouth, Dawns thy Great Vision, mid thy soul’s last drouth; And, past Hell’s flame and Purgatory’s round, Greets thee thy love most gentle, once again, Thou frowning Florentine with laurels crowned!
  • 57. Love’s Blindness. “O LOVE, my Love, thou canst not know how sweet, How dear thou art!”—“Naught would I know, save this That thou wilt ever yearn to share my kiss! So being, I reck not whether years be fleet Or endless!”—“But thou canst not see thy face As others see thee! Thy deep eyes that greet Their lucent-mirrored glimmerings, melt and meet In glory there, to blind themselves a space!” “Hush, O my heart! Thy vain hyperbole Means naught; but take in both thy hands and turn To thee this face of mine, and kiss my brow, And after that mine eyes which cannot see But only feel thy lips that thrill, and now My mouth, and now—O God! thy kisses burn!”
  • 58. Hesperides. I NOW once again the angry sun Wheels up the heaven his tireless way; Once more we strangling herds of men Wake to our labours never-done, Rise up to toil another day. Down flares the heat on town and street, Wide-warping pillar, span and plinth; Once more my burning, wearied eyes Within this monstrous labyrinth Meet the mad heat that stifles me, And O, my baffled spirit flies In dreams to thy green wood and thee, To thee!... To thee!... II
  • 59. My pavement-wearied feet again Tread the rough streets whose ways are pain, Hot with the sun’s last sullen beam, And yet—I dream! Dream when I wake, and at high, blinding Noon, Or when the moon Mocks the sad City in her sullen night That burns too bright! So sweet my visions seem That from this sordid smoke and dust I turn, Turn where the dim Wood-world calls out to me And where the forest-virgins I half see With green mysterious fingers beckoning! Where vine-wreathed woodland altars sunlit burn, Or Dryads weave their mystic rounds and sing, Sing high, sing low, with magic cadences That once the wild oaks of Dodona heard; And every wood-note bids me burst asunder The bonds that hold me from the leaf-hid bird! I quaff thee, O Nepenthe! Ah, the wonder Grows that there be who scorn not wealth and ease, Who still will choose the street-life, rough and blurred, Who will not quest you, O Hesperides!... III
  • 60. And now, and now... I feel the forest-moss! O, on these moss-beds let me lie with Pan, Twined with the ivy-vine in tendrilled curls! And I will hold all gold that hampers man But the base ashes of a barren dross! On with the love-dance of the pagan girls! The pagan girls with lips all rosy-red, With breasts up-girt and foreheads garlanded! With fair white foreheads nobly garlanded! With sandalled feet that weave the magic ring Now ... let them sing, And I will pipe a song that all may hear, To bid them mind the time of my wild rhyme! Away! Away! Beware our mystic trees! Who will not quest you, O Hesperides?... IV Great men of song, what sing ye? Woodland meadows? Rocks, trees and rills where sunlight glints to gold? Sing ye the hills adown whose sides blue shadows Creep when the westering day is growing old? Sing ye the brooks where in the purling shallows The small fish dart and gleam? Sing ye the pale green tresses of the willows That stoop to kiss the stream? Or sing ye burning streets and sweating toil Where we spawned swarms of men, unendingly, Above, below, in mart and workshop’s moil Have quite forgot thee, O mine Arcady?...
  • 61. My Garden. With a copy of “Sonnets of this Century.” THIS little book, a Garden where the bloom And fragrance of an hundred years are pent, To thee, dear girl, at Christmas-tide is sent By one who breathes with love the sweet perfume Of such frail flowers. Let aye the world consume Itself with toil and labour—such are all Without the bounds of this my garden-wall, And I, in light, feel not nor heed their gloom. Come thou into my Garden! Let me show Thee all the treasures that do lend it grace, These goodly Sonnets, standing in a row To tell of joy, tears, love,—life’s madrigal; And, mistress of the pure enchanted place, Be thou the fairest Flower among them all!...
  • 62. Erinnerungen. SCHWER ist mein Herz, und heute kann ich nicht Mehr lesen—kann nicht denken, leiden mehr. Aus jeder Ecke kommt ein Schatten her, Wie aus dem toten Himmel geht das Licht. Ich sinn’ und sinn’—ich sehe ihn noch, wie er Vor langen Jahren zartlich schaut’ mich an Eh’ unsere reine Liebe erst begann Langsam zu sterben, ich zu trauern sehr... Schwer ist mein Herz. Aus seinen Ecken auch Kriechen die Schatten, schnell und schneller. Jetzt Vernimmt mein müdes Ohr den ersten Hauch Der Winternacht ... Es glimmert Strom und Wald In dunkler Ferne ... Dies vergeht zuletzt, Und alles endlich finster ist und kalt...
  • 63. The Battle Royal. THOU Battle Royal! Kings and gentlemen At arms, and lords have fought thee since the mists Of time, back-rolling, show’d thy mimic lists And pigmy warriors, mazed and harried then As now in meshes of thy checkered strife— Unshielded Pawns, trim Knights and frowning Rooks Stolid yet quick, and Bishops smug, with looks A-squint, and King with lame yet endless life. Thou Battle Royal! Years unnumbered soil Cards, draughts and dice with myriad grime-worn hands. Thou, lov’d by dames and lords in all the lands Of this broad world art still the world’s best play; Where, as in life, whilst others struggle, toil, And die, the imperious Queen controls the day!
  • 64. España. “Que era, decidme, la nación que un día Reina del mundo proclamó el destino?...” Quintana—Oda a España. WHERE now that Nation proud which Destiny Once did proclaim this world’s all conquering queen? Where now that sceptre, that bright blazon seen That mark’d her mistress over land and sea? A lost emprise, a shattered galleon she, Sails rent and hull agape that once have been World-powerful; her rotting masts careen With each dark surge of long-pent enmity. On through sea’s salty wastes the tempests spurn, The waves rebuff her; lights no more there gleam Nor vergies wave on her high carven beam. Stilled is the sailor’s jest, the skipper’s song; In swirling fogs of night she drives along With Helmsman Death stark-frozen at the stern!...
  • 65. Love’s Fear. V IRGIN art thou and pure, amid a throng Of such sweet hallowed names as all men praise. (Grown all too scant in these our latter days!) To holy hours of old dost thou belong; Saint Agnès then had heard thine even-song, Nor left thee, darkling, in Earth’s devious ways. Thou’rt one with that sweet sisterhood which raise To “untouched Dian,” all clear streams along, Their full-voiced anthem. Thou a Vestal art At true-love’s altar. Atala, and the Maid, And Mary all are sisters of thy blood! Thy very name is virgin!... I, afraid, How shall I press my kisses on thy heart, Or loose the girdle of thy maidenhood?...