Preview course for free

Preview this course for free.

To preview this course, you will need to create a free account. Once you register, we'll send
you right along and you will get access to the first task in the course (day 1).


No credit card or payment info is required. Existing users, sign-in to begin.

Preview this course for free.

To preview this course, you will need to create a free account. Once you register, we'll send
you right along and you will get access to the first task in the course (day 1).


No credit card or payment info is required. Existing users, sign-in to begin.

Take a class, join the instructor-supported online learning revolution.

Choose a class date below to get started. Every class comes with a complimentary subscription which begins immediately even if your class doesn't start for a week or two. You can be learning in just minutes.

Upcoming classes: Choose this date >>


Take this course.

You'll need to get a subscription to join this course.
Our subscriptions start at $29.

View your subscription options
Course Summary

Accepting user input in ASP.NET MVC is for developers who have dabbled with MVC but have yet to dig deep into building input forms (e. g. <form>...</form>) which accept a wide variety of user input. Or possibly you've built a few forms, but are not sure how to safely re-display untrusted user input or validate that the inputs are correct in the first place (e.g. start-date is before end-date, that sort of thing).

You will start with a quick overview of building strongly-typed views with MVC's Razor syntax. From there we will quickly move on passing data around in your MVC application including from users to controllers via URLs and routing and from controllers on to the views using view models.

Then we come to the core content of the class. We will build a variety of input forms. We will add client-side and server-side validation to these forms as well as discuss how to safely re-display potentially malicious data. Finally, we'll build a typically data-grid type of view in MVC.

Course Objectives

After completing this course, you should be proficient in the following:

  • Fix common razor syntax errors, differentiate expressions versus statements.
  • Prevent script-injection vulnerabilities.
  • Pass data from the controller action to the view using view models.
  • Create clean URLs using routing.
  • Create input forms that accept all types of user input.
  • Create a form with a drop-down list (select list).
  • Enable server-side validation using built-in attributes.
  • Report validation errors.
  • Enable MVC’s client-side validation libraries.
  • Discover additional validation libraries built for MVC.
Edit video url:

Edit Course Objectives











Change objectives

Tasks

Search tasks

tasks found
Save
Preview this task « This task is available right now for free, no payment info required.
Create views in MVC (Razor and C#)
8 Activities | Time: 1h 34m | Types: Blog (5) | Practice (2) | Video (1)
Pass data to views
9 Activities | Time: 1h 23m | Types: Article (4) | Blog (1) | Practice (2) | Video (2)
Handle parameters from a URL (routing in MVC)
5 Activities | Time: 1h 16m | Types: Blog (1) | Practice (2) | Run (1) | Video (1)
Build Rich Forms to Accept Data with MVC
5 Activities | Time: 1h 1m | Types: Article (2) | Blog (1) | Practice (1) | Video (1)
Validating User Input with Data Annotations
7 Activities | Time: 1h 30m | Types: Article (3) | Practice (3) | Video (1)