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 class AssociatedMetadataTypeTypeDescriptionProvider Extends 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 apps AssociationAttribute Specifies that an entity member represents a data relationship, such as a foreign key relationship.
Public class BindableTypeAttribute Specifies whether a type is typically used for binding.
Public class CompareAttribute Provides an attribute that compares two properties.
Public class Supported by Portable Class Library Supported in .NET for Windows Store apps ConcurrencyCheckAttribute Specifies that a property participates in optimistic concurrency checks.
Public class CreditCardAttribute Specifies that a data field value is a credit card number.
Public class Supported by Portable Class Library Supported in .NET for Windows Store apps CustomValidationAttribute Specifies 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 apps DataTypeAttribute Specifies 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 apps DisplayAttribute Provides 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 apps DisplayColumnAttribute Specifies 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 apps DisplayFormatAttribute Specifies 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 apps EditableAttribute Indicates whether a data field is editable.
Public class EmailAddressAttribute Validates an email address.
Public class Supported by Portable Class Library Supported in .NET for Windows Store apps EnumDataTypeAttribute Enables a .NET Framework enumeration to be mapped to a data column.
Public class FileExtensionsAttribute Validates file name extensions.
Public class Supported by Portable Class Library Supported in .NET for Windows Store apps FilterUIHintAttribute Represents 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 apps KeyAttribute Denotes one or more properties that uniquely identify an entity.
Public class MaxLengthAttribute Specifies the maximum length of array or string data allowed in a property.
Public class MetadataTypeAttribute Specifies the metadata class to associate with a data model class.
Public class MinLengthAttribute Specifies the minimum length of array of string data allowed in a property.
Public class PhoneAttribute Specifies 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 apps RangeAttribute Specifies the numeric range constraints for the value of a data field.
Public class Supported by Portable Class Library Supported in .NET for Windows Store apps RegularExpressionAttribute Specifies 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 apps RequiredAttribute Specifies that a data field value is required.
Public class ScaffoldColumnAttribute Specifies whether a class or data column uses scaffolding.
Public class ScaffoldTableAttribute Specifies whether a class or data table uses scaffolding.
Public class Supported by Portable Class Library Supported in .NET for Windows Store apps StringLengthAttribute Specifies 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 apps TimestampAttribute Specifies the data type of the column as a row version.
Public class Supported by Portable Class Library Supported in .NET for Windows Store apps UIHintAttribute Specifies the template or user control that Dynamic Data uses to display a data field.
Public class UrlAttribute Provides URL validation.
Public class Supported by Portable Class Library Supported in .NET for Windows Store apps ValidationAttribute Serves as the base class for all validation attributes.
Public class Supported by Portable Class Library Supported in .NET for Windows Store apps ValidationContext Describes the context in which a validation check is performed.
Public class Supported by Portable Class Library Supported in .NET for Windows Store apps ValidationException Represents 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 apps ValidationResult Represents a container for the results of a validation request.
Public class Supported by Portable Class Library Supported in .NET for Windows Store apps Validator Defines a helper class that can be used to validate objects, properties, and methods when it is included in their associated ValidationAttribute attributes.
posted @ 2013-02-04 17:33  V青山绿水  阅读(626)  评论(0编辑  收藏  举报