Custom Data Annotation Validator Part II: Client Code

Posted by: K. Scott Allen, on 23 Feb 2011 | View original | Bookmarked: 0 time(s)

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...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: XML | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 740 | Hits: 23

Similar Posts

  • Designer Support for One-Way navigations in Entity Framework 4 more
  • How to display data from different tables using one data source more
  • ClientIDMode in ASP.NET 4.0 more
  • How To: Silverlight grid hierarchy load on demand using MVVM and RIA services more
  • EF4: Lazy Loading on By Default but what about pre Beta 2 Models? more
  • Migrated from Community Server to DasBlog more
  • Web Deployment Tool released to web (RTW) more
  • ASP.NET MVC 2 Preview 2 more
  • An alternative to Crystal more
  • Building a class browser with Microsoft Ajax 4.0 Preview 5 more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD