System.ComponentModel.DataAnnotations 4.0.0.0 System.Attribute System.AttributeUsage(System.AttributeTargets.Property | System.AttributeTargets.Field | System.AttributeTargets.All, AllowMultiple=false)

When you apply this attribute to a data field, you must follow the guidelines for the use of the attributes. For more information, see ASP.NET Dynamic Data Guidelines.

Specifies how data fields are displayed and formatted by ASP.NET Dynamic Data.

- Constructor
  4.0.0.0
  To be added.

  Initializes a new instance of the class.

- Property
  4.0.0.0
  System.Boolean To be added.

  By default, the formatting string that is specified by the property is applied to field values only when the data-bound control is in read-only mode.

  Gets or sets a value that indicates whether the formatting string that is specified by the property is applied to the field value when the data field is in edit mode.

- Property
  4.0.0.0
  System.Boolean To be added.

  Users might enter an empty string for a field value. Use the property to specify whether an empty string value is automatically converted to null when the data field is updated in the database.

  By default, a object displays null values as empty strings. To display a different value, set the property.

  Gets or sets a value that indicates whether empty string values ("") are automatically converted to null when the data field is updated in the data source.

- Property
  4.0.0.0
  System.String To be added.

  Use the property to specify a custom display format for the values that are displayed in the object. If the property is not set, the field's value is displayed without any special formatting. For more information, see Formatting Overview.

  When the property is true, the value of the field is HTML encoded to its string representation before the formatting string is applied. For some objects, such as dates, you might want to control how the object is displayed with a formatting string. In those cases, you must set the property to false.

  By default, the formatting string is applied to the field value only when the data-bound control that contains the object is in read-only mode. To apply the formatting string to field values when they are in edit mode, set the property to true.

  The formatting string can be any literal string and usually includes a placeholder for the field's value. For example, in the formatting string "Item Value: {0}", the field's value is substituted for the {0} placeholder when the string is displayed in the object. The remainder of the formatting string is displayed as literal text.

  If the formatting string does not include a placeholder, the field's value from the data source is not included in the final display text.

  Gets or sets the display format for the field value.

- Property
  4.0.0.0
  System.Boolean To be added. To be added.

  Gets or sets a value that indicates whether the field should be HTML-encoded.

- Property
  4.0.0.0
  System.String To be added.

  Sometimes a data field's value is stored as null values in the source. You can specify custom text to display for data fields that have a null value by setting the property. If this property is not set, null field values are displayed as empty strings ("").

  To convert an empty string field value to a null value, you must set the property to true.

  Gets or sets the text that is displayed for a field when the field's value is null.