北大青鸟光谷校区

北大青鸟光谷校区

  • 北大青鸟徐东校区
  • 北大青鸟光谷校区
  • 北大青鸟宏鹏IT校区
  • 荆州青鸟之家
  • 襄阳青鸟之家

15902769092

百日千才

Asp.net MVC 4 模型的数据注释-武汉北大青鸟.net培训

2013-10-16 14:23来源:武汉北大青鸟光谷校区作者:武汉北大青鸟

  Asp.net MVC 4 模型的数据注释-武汉北大青鸟.net培训

        [Bind(…)]

  Lists fields to exclude or include when binding parameter or form values to model properties

  列表字段时,排除或包括绑定参数或表单模型属性值

  [Compare("…")]

  To compare two properties.

  对比两个属性。

  [CreditCard]

  To Specify that a data field value is a credit card number.

  要指定一个数据字段的值是一个信用卡号码。

  [DataType(DataType.)]

  used for formatting purposes, not for validation.

  使用于格式的目的,而不是用于验证。

  [DisplayName (…)]

  Defines the text we want used on form fields and validation messages

  我们希望定义的文本上使用的表单字段和验证消息

  [EmailAddress]

  To validate an email address

  为了验证一个电子邮件地址

  [FileExtensions(Extensions = "jpg,png…")]

  To Validate file name extensions.

  为了验证文件名扩展。

  [key]

  To denote one or more properties that uniquely identify an entity.

  为了表示一个或多个属性,标识一个实体。

  [MaxLength(…)]

  To define the maximum length of array or string data allowed in a property.

  要定义数组或字符串数据的属性中允许的更大长度。

  [MinLength(…)]

  To define the minimum length of array of string data allowed in a property.

  要定义数组或字符串数据的属性中允许的小长度。

  [Phone..]

  To Specify for phone number using a regular expression.

  指定的电话号码,使用正则表达式。

  [Range (…)]

  Gives a maximum and minimum value for a numeric field

  给出了一个数字字段的更大值和小值

  [RegularExpression(…)]

  To specify that a data field value must match the specified regular expression.

  要指定数据字段值必须与指定的正则表达式。

  [Required (…)]

  Indicates that the property is a required field

  表示该属性是必需的

  [StringLength(…)]

  Defines a maximum length for a string field

  定义字符串字段的更大长度

  [ScaffoldColumn(…)]

  Allows hiding fields from editor forms

  允许从编辑器表单的隐藏字段

  [Url]

  It provides URL validation.

  它提供URL验证

        武汉北大青鸟光谷校区.net培训课程咨询电话:15902769092.

关闭

只为了方便您就学 北大青鸟光谷校区 北大青鸟光谷校区

武汉市江夏区华泰街武昌理工学院对面

全真项目实战 入学签就业协议

Copyright (c) 2006-2021 武汉宏鹏教育咨询有限公司 版权所有 All Rights Reserved.