Join Jess Chadwick for an in-depth discussion in this video Displaying validation errors, part of ASP.NET Core: Razor Pages.
- [Instructor] The last thing I did to this form…was to implement server side data validation…that rejected a user's request,…and to show them the edit page again…when they attempted to submit invalid data.…This works great.…If I'm the owner of this site and its data,…since those invalid values…have been kept out of my database;…however, if I'm the user of this page,…expecting my changes to be saved,…but instead just seeing the edit page again…with no indication of what went wrong,…other than these red boxes,…this behavior is just confusing,…and I'm left wondering what I did wrong.…
So to help our users out,…let's show them some error messages…to let them know when they've done something wrong,…and to do so, I'm going to use two new tag helpers…to display those error messages in the proper places,…so that users will have the information they need…in order to fix their mistakes.…The first tag helper I'll show…is the asp-validation-summary helper.…This one is the most helpful of the two…because it renders all the validation errors in one list…
- Creating a new application
- Setting up pages
- Rendering dynamic content
- Reusing markup with layouts
- Increasing the maintainability of pages
- Processing data
- Validating input
- Securing an application
Skill Level Intermediate
Deploying ASP.NET Core Applicationswith Nate Barbettini57m 57s Intermediate
Building Web APIs with ASP.NET Corewith Chris Woodruff1h 7m Intermediate
ASP.NET Core: Test-Driven Developmentwith Richard Rout37m 30s Intermediate
1. Razor Pages Intro
What is Razor Pages?3m 5s
2. Razor Pages Basics
3. Reusing Markup with Layouts
4. Building Maintainable Applications
5. Working with Data
6. Validating User Inputs and Securing Your Application from Unauthorized Users
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.