MVC部份属性验证控件

http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.displayattribute.aspx

 

The System.ComponentModel.DataAnnotations namespace provides attribute classes that are used to define metadata for ASP.NET MVC and ASP.NET data controls.

 ClassDescription
Public classAssociatedMetadataTypeTypeDescriptionProviderExtends the metadata information for a class by adding attributes and property information that is defined in an associated class.
Public class Supported by Portable Class Library Supported in .NET for Windows Store appsAssociationAttributeSpecifies that an entity member represents a data relationship, such as a foreign key relationship.
Public classBindableTypeAttributeSpecifies whether a type is typically used for binding.
Public classCompareAttributeProvides an attribute that compares two properties.
Public class Supported by Portable Class Library Supported in .NET for Windows Store appsConcurrencyCheckAttributeSpecifies that a property participates in optimistic concurrency checks.
Public classCreditCardAttributeSpecifies that a data field value is a credit card number.
Public class Supported by Portable Class Library Supported in .NET for Windows Store appsCustomValidationAttributeSpecifies a custom validation method that is used to validate a property or class instance.
Public class Supported by Portable Class Library Supported in .NET for Windows Store appsDataTypeAttributeSpecifies the name of an additional type to associate with a data field.
Public class Supported by Portable Class Library Supported in .NET for Windows Store appsDisplayAttributeProvides a general-purpose attribute that lets you specify localizable strings for types and members of entity partial classes.
Public class Supported by Portable Class Library Supported in .NET for Windows Store appsDisplayColumnAttributeSpecifies the column that is displayed in the referred table as a foreign-key column.
Public class Supported by Portable Class Library Supported in .NET for Windows Store appsDisplayFormatAttributeSpecifies how data fields are displayed and formatted by ASP.NET Dynamic Data.
Public class Supported by Portable Class Library Supported in .NET for Windows Store appsEditableAttributeIndicates whether a data field is editable.
Public classEmailAddressAttributeValidates an email address.
Public class Supported by Portable Class Library Supported in .NET for Windows Store appsEnumDataTypeAttributeEnables a .NET Framework enumeration to be mapped to a data column.
Public classFileExtensionsAttributeValidates file name extensions.
Public class Supported by Portable Class Library Supported in .NET for Windows Store appsFilterUIHintAttributeRepresents an attribute that is used to specify the filtering behavior for a column.
Public class Supported by Portable Class Library Supported in .NET for Windows Store appsKeyAttributeDenotes one or more properties that uniquely identify an entity.
Public classMaxLengthAttributeSpecifies the maximum length of array or string data allowed in a property.
Public classMetadataTypeAttributeSpecifies the metadata class to associate with a data model class.
Public classMinLengthAttributeSpecifies the minimum length of array of string data allowed in a property.
Public classPhoneAttributeSpecifies that a data field value is a well-formed phone number using a regular expression for phone numbers.
Public class Supported by Portable Class Library Supported in .NET for Windows Store appsRangeAttributeSpecifies the numeric range constraints for the value of a data field.
Public class Supported by Portable Class Library Supported in .NET for Windows Store appsRegularExpressionAttributeSpecifies that a data field value in ASP.NET Dynamic Data must match the specified regular expression.
Public class Supported by Portable Class Library Supported in .NET for Windows Store appsRequiredAttributeSpecifies that a data field value is required.
Public classScaffoldColumnAttributeSpecifies whether a class or data column uses scaffolding.
Public classScaffoldTableAttributeSpecifies whether a class or data table uses scaffolding.
Public class Supported by Portable Class Library Supported in .NET for Windows Store appsStringLengthAttributeSpecifies the minimum and maximum length of characters that are allowed in a data field.
Public class Supported by Portable Class Library Supported in .NET for Windows Store appsTimestampAttributeSpecifies the data type of the column as a row version.
Public class Supported by Portable Class Library Supported in .NET for Windows Store appsUIHintAttributeSpecifies the template or user control that Dynamic Data uses to display a data field.
Public classUrlAttributeProvides URL validation.
Public class Supported by Portable Class Library Supported in .NET for Windows Store appsValidationAttributeServes as the base class for all validation attributes.
Public class Supported by Portable Class Library Supported in .NET for Windows Store appsValidationContextDescribes the context in which a validation check is performed.
Public class Supported by Portable Class Library Supported in .NET for Windows Store appsValidationExceptionRepresents the exception that occurs during validation of a data field when the ValidationAttributeclass is used.
Public class Supported by Portable Class Library Supported in .NET for Windows Store appsValidationResultRepresents a container for the results of a validation request.
Public class Supported by Portable Class Library Supported in .NET for Windows Store appsValidatorDefines a helper class that can be used to validate objects, properties, and methods when it is included in their associated ValidationAttribute attributes.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值