A basic sample of a Razor Pages web application
- _Layout.cshtml
- Index.cshtml
- Contact.cshtml
- EditBook.cshtml
- Contact.cs (Data Annotations)
- Book.cs (Data Annotations)
- EditBook.cshtml (Form Validation Summary)
- Contact.cshtml (Validation error per input)
- EditBooks.cshtml.cs (OnPost -> check model state)
- Contact.cshtml.cs (OnPost -> check model state)
- Startup.cs (see AddRazorPagesOptions)
- BookDetail.cshtml (use slug as route parameter instead of id)
- Built-in route constraint
- EditBook.cshtml
- Custom route constraint
- PromoConstraint.cs (definition)
- Feedback.cshtml (usage)
- Confirmation.cshtml.cs
- Contact.cshtml.cs (redirect to page with custom page handler)
- ReusableWidget.cshtml (definition)
- Index.cshtml (usage)
- Components/RecentBooks/Default.cshtml
- RecentBooks.cs
- Index.cshtml (usage)
- _Layout.cshtml (definition)
- Books.cshtml (usage)
- Startup.cs (see ConfigureServices)
- IBookService.cs
- Books.cshtml.cs
- Books.cshtml.cs
- Startup.cs (see ConfigureServices and Configure)