Steve

மாற்று! » பதிவர்கள்

Steve

Partial Validation in ASP.NET MVC 2    
February 19, 2010, 6:23 pm | தலைப்புப் பக்கம்

It’s tiny tip time… Since all the fuss about [Required] validators in ASP.NET MVC 2, the validation behaviour was changed in Release Candidate 2. Previously, the framework only validated fields that were actually posted in the form, whereas now it validates all the fields on any model object that the model binder gives you. Most people prefer this new behaviour, because they don’t like the idea that someone can avoid a [Required] rule just by using FireBug or similar to delete the HTML...தொடர்ந்து படிக்கவும் »
பகுப்புகள்:

Validating a variable length list, ASP.NET MVC 2-style    
January 28, 2010, 4:36 pm | தலைப்புப் பக்கம்

In the previous post I showed a fairly straightforward way to create an editor where the user can add and delete the items in a set. Please read that previous post before continuing to read this one. But what about validation? We don’t like your blank item names or your negative prices, sonny! As you probably know, ASP.NET MVC 2 supports DataAnnotations attributes out of the box, so you can mark up your model as follows. public class Gift { [Required] public string Name { get;...தொடர்ந்து படிக்கவும் »
பகுப்புகள்: