
MVC3 Razor
Get flash to fully experience Pearltrees
Custom Data Annotations With MVC: How to Check Multiple Properties at One Time | Programming By A Tool
The validator we looked at in the last post only supports server side validation. To support client side validation we need a little more code on the server, and some custom client script. One approach to client validation is to have the validation attribute implement the IClientValidatable interface, which requires a single method: GetClientValidationRules. public class DateGreaterThanAttribute : ValidationAttribute , IClientValidatable { public IEnumerable < ModelClientValidationRule > GetClientValidationRules( ModelMetadata metadata, ControllerContext context) { var rule = new ModelClientValidationRule (); rule.ErrorMessage = FormatErrorMessage(metadata.GetDisplayName()); rule.ValidationParameters.Add( "other" , OtherProperty); rule.ValidationType = "greaterdate" ; yield return rule; } // ...
Custom Data Annotation Validator Part II: Client Code
Custom Data Annotation Validator Part I : Server Code
"When should I use a ViewBag vs. ViewData vs. TempData objects?"
When to use ViewBag, ViewData, or TempData in ASP.NET MVC 3 applications-Rachel Appel on Software Development
Uploading files in ASP.NET MVC « Todd On .NET
ASP.NET MVC3 has been a major boon to my productivity as a web developer since I started using it at the beginning of November – the new Razor view engine has been attracting most of the attention with this iteration of MVC, but one extremely sexy feature has gone unnoticed thus far: Remote validation . Remote validation was one of the new features added in the November Release Candidate (RC) for MVC3 – I had a chance to demo it in front of the LA .NET User Group last night and it was a monster hit. Example:
Aaronontheweb | How-To: Remote Validation in ASP.NET MVC3
One validation feature that we didn’t quite have time for in MVC 2’s new client-side validation support is called “remote validation”. Remote validation means we make a call back to our web site to ensure that a given value is valid. You might want this in cases where it’s not easy (or possible) to determine whether the value is valid on the client side, but you’d still like to give the user client-side feedback about the validity of the item. The canonical example is checking to see if a desired username is taken during your site registration process. This is an example remote validator that I modified from an example by Levi Broderick (who did the bulk of the JavaScript work for client-side validation).
Brad Wilson: Remote Validation with ASP.NET MVC 2
Partial Views
Links FileUpload
Creating a MVC 3 Application with Razor and Unobtrusive JavaScript
Two weeks ago we shipped the ASP.NET MVC 3 Beta Release . It supports “go live” deployments, and includes a bunch of nice improvements/enhancements. You can see a summary of the new ASP.NET MVC 3 features in my beta announcement post . Also read my original ASP.NET MVC 3 Preview post to learn about other ASP.NET MVC 3 features that showed up with that initial preview release.
MVC 3: Layouts with Razor
Introducing “Razor” – a new view engine for ASP.NET
(includes April 2011 Tools Update) ASP.NET MVC 3 is a framework for building scalable, standards-based web applications using well-established design patterns and the power of ASP.NET and the .NET Framework. It installs side-by-side with ASP.NET MVC 2, so get started using it today!

