Join Jess Chadwick for an in-depth discussion in this video Customize your application's URLs, part of Learning ASP.NET Core MVC.
- [Narrator] Defining a single global route…for your entire site as I've shown…is a really convenient and effect way…to map any URLs in your application…to a controller and action.…And there are a lot of very successful applications…written just this way.…Personally however, I don't like to be restricted…by a single convention across my entire site.…Instead I like to have the ability…to attach any custom URL that I want…and create vanity URLs such as slash log in,…that don't necessarily have anything to do…with the name of the controller…or the action that handles them.…
To help demonstrate why we might want to customize…our site's URLs,…let's take a look at how our default route configuration…drives our URLs right now.…Keep in mind that our default route…currently follows the pattern of…slash controller, slash action, slash ID…which means that if we want to view…a blog post with the ID of one,…then we'd have to navigate to slash blog, slash post…slash one.…However, wouldn't it be nice…if we could make this URL a little more meaningful.…
- Building blocks of ASP.NET Core applications
- Creating a new project
- Responding to HTTP requests
- Serving static files
- Understanding the MVC pattern
- Handling requests with controllers
- Rendering HTML with Razor
- Rendering data, view markup, and view logic
- Creating HTML forms
- Validating form data
- Reading and writing from a database with Entity Framework
- Improving the user experience
- Exposing data with a web API
- Securing your ASP.NET application
Skill Level Intermediate
1. The Basics
2. The Model-View-Controller (MVC) Pattern
Understand routing4m 24s
3. Render HTML with Views
4. Work with Data
5. Improve User Experience with Ajax and Web APIs
6. Secure Your Application
Next steps1m 42s
- 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.