.NET:System.ComponentModel.DataAnnotations [英] .NET: System.ComponentModel.DataAnnotations

查看:100
本文介绍了.NET:System.ComponentModel.DataAnnotations的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可有人点我一个基于web /截屏或教程 - 视频preferrably - 这解释了这一新的命名空间,我怎么可以用它来帮助验证如用户输入数据? pretty的吧。

Can someone point me to a web-/screencast or tutorial--video preferrably--that explains this new namespace and how I can use it to help validate data like user input? Pretty please.

推荐答案

试试这个(对不起,不可视):

Try this (sorry, not visual):

<一个href="http://stephenwalther.com/blog/archive/2008/09/10/asp-net-mvc-tip-43-use-data-annotation-validators.aspx">ASP.NET MVC的提示#43 - 使用数据注释验证器:

在这篇文章中,我将演示如何利用   优势从校验器   System.ComponentModel.DataAnnotations   命名空间在MVC应用程序。您   可以利用这些验证程序   之前验证表单数据   提交表单数据转换成一个   数据库。

In this tip, I demonstrate how to take advantage of the validators from the System.ComponentModel.DataAnnotations namespace in an MVC application. You can take advantage of these validators to validate form data before submitting the form data into a database.

这篇关于.NET:System.ComponentModel.DataAnnotations的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆