Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Treehouse

ASP.NET MVC Forms Course (How To)

via Treehouse

Overview

In this course, you’ll learn how to create forms using ASP.NET MVC. Along the way, you’ll use various field types and form validation as we build a web version of the Fitness Frog application from C# Basics.

What you'll learn

  • Creating Forms for CRUD Applications
  • Handling Form Posts
  • Model State
  • Using HTML Helpers to Create Form Fields
  • Model Binding
  • Client-Side and Server-Side Form Validation

Syllabus

Introducing CRUD Applications

We’ll start with an introduction to CRUD applications. Then we’ll review, download, and setup the Fitness Frog Web App that we’ll be completing in this course.

Chevron 6 steps
  • Introduction

    2:53

  • Welcome to the Fitness Frog Web App

    4:49

  • Getting Started

    3:18

  • Reviewing Our Project Files

    6:04

  • Reviewing the List Page

    3:36

  • Section Review

    5 questions

Creating a Basic Form

We’ll update the "Add Entry" page's HTML form so that our users can add entries. Along the way, we’ll look at the various ASP.NET MVC features that we can use to create forms. We’ll also look at how we can use model binding to simplify our code.

Chevron 15 steps
  • Getting Familiar with Our HTML Form

    6:13

  • HTML Forms Review

    5 questions

  • Handling a Form Post

    3:41

  • Using Model Binding to Capture POST Data

    8:34

  • Adding a POST Action Method

    1 objective

  • Working with Non-String Data

    6:21

  • Invalid Values and ModelState

    5:13

  • Creating Forms Using the HTML Helpers

    6:43

  • Using HTML Helpers

    3 objectives

  • Using Our Models

    5:11

  • Completing Our Model Related Updates

    6:23

  • Using Strongly Typed HTML Helpers

    3 objectives

  • Redirecting Back to the List Page

    7:12

  • Redirecting to an Action

    1 objective

  • Section Review

    5 questions

Improving Our Form

We’ll improve our form by adding a drop down list, radio buttons, a check box, and a date picker.

Chevron 9 steps
  • Working with Drop Down Lists

    8:39

  • Completing the “Activity” Field Drop Down List

    4:33

  • Drop Down Lists

    1 objective

  • Using Radio Buttons

    7:50

  • Radio Buttons

    1 objective

  • Using Check Boxes

    8:11

  • Check Boxes

    1 objective

  • Adding a Datepicker

    9:20

  • Section Review

    5 questions

Adding Form Validation

We’ll learn how to add validation to our form in order to prevent the user from providing “bad” or incorrect data. We’ll also take a look at the differences between server-side and client-side validation.

Chevron 11 steps
  • Introducing Form Validation

    4:04

  • Form Validation

    5 questions

  • Implementing Server-Side Validation Using ModelState

    5:45

  • Adding Server-Side Validations Using ModelState

    1 objective

  • Implementing Server-Side Validation Using Data Annotations

    4:36

  • Adding Server-Side Validations Using Data Annotations

    1 objective

  • Displaying Validation Messages

    5:31

  • Displaying Validation Messages

    1 objective

  • Implementing Unobtrusive Client-Side Validation

    10:11

  • Improving Validation CSS Styles

    6:03

  • Section Review

    5 questions

Finishing Our CRUD Web App

We’ll finish our web app by adding “Edit Entry” and “Delete Entry” pages.

Chevron 8 steps
  • Updating Our Controller to Handle Updates

    9:43

  • Creating a Partial View for Our Form

    6:47

  • Partial Views

    1 objective

  • Updating Our Controller to Handle Deletes

    5:01

  • Updating Our “Delete” View

    7:27

  • Using TempData

    5:50

  • Wrap Up

    1:53

  • Section Review

    5 questions

Reviews

Start your review of ASP.NET MVC Forms Course (How To)

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.