Join Michael Sullivan for an in-depth discussion in this video ASP.NET MVC: Working with models and forms, part of Learning ASP.NET.
…We'll continue with our tour creation form from the last video, and take a look…at how to customize the client and…server side validation by adjusting our model properties.…We'll also get a chance to see how the model…is actually passed to the controller when the form is submitted.…So in this form that was just generated for us.…If we click Create, we get messages that say length and price are required.…That might seem odd to you that it only complains about those two fields, but…the reason is that the other fields in my model are strings, which can be null.…
And a Boolean which is false by default.…But length is an inch and price is…a decimal, neither of which accept null values.…You'll have built in server side validation.…But if you try to enter an invalid value…for Length or Price now, you'll notice that what…you're seeing is actually client side validation, which is…provided for us automatically using the jQuery validate library.…If I want to change this behavior at all, I can do…that by going to Visual Studio, and editing my model class.…
- Exploring .NET in general and ASP.NET in particular
- Creating controllers and views
- Working with models and forms
- Managing data
- Creating web APIs
- Establishing connections with SignalR
Skill Level Beginner
ASP.NET MVC 4 Essential Trainingwith Jess Chadwick3h 56m Intermediate
1. Exploring the Framework and the Development Environment
2. Structuring Applications
3. Working with Data
Using LINQ to Entities6m 12s
4. Web API and RESTful Services
5. Real-Time Web with SignalR
6. Hands-On Practice
Next steps2m 3s
- 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.