System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 4.0.0.0 System.Attribute [System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Method | System.AttributeTargets.Parameter | System.AttributeTargets.Property, AllowMultiple=false)] [<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Method | System.AttributeTargets.Parameter | System.AttributeTargets.Property, AllowMultiple=false)>] [System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Field | System.AttributeTargets.Method | System.AttributeTargets.Parameter | System.AttributeTargets.Property, AllowMultiple=false)] [<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Field | System.AttributeTargets.Method | System.AttributeTargets.Parameter | System.AttributeTargets.Property, AllowMultiple=false)>] [System.Runtime.CompilerServices.Nullable(0)] [<System.Runtime.CompilerServices.Nullable(0)>] Provides a general-purpose attribute that lets you specify localizable strings for types and members of entity partial classes. instance. ]]> Constructor System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 4.0.0.0 Initializes a new instance of the class. , , , and properties to an empty string. ]]> Property System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 4.0.0.0 System.Boolean Gets or sets a value that indicates whether UI should be generated automatically in order to display this field. if UI should be generated automatically to display this field; otherwise, . property. Use the method instead. ]]> An attempt was made to get the property value before it was set. Property System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 4.0.0.0 System.Boolean Gets or sets a value that indicates whether filtering UI is automatically displayed for this field. if UI should be generated automatically to display filtering for this field; otherwise, . property. Use the method instead. Setting this property overrides the default behavior for specifying which columns are included as filters. ## Examples The following example shows how to disable the filter for the Employee1 field. ```csharp [MetadataType(typeof(EmployeeMD))] public partial class Employee { public class EmployeeMD { [Display(Name = "Last Name", Order = -9, Prompt = "Enter Last Name", Description="Emp Last Name")] public object LastName { get; set; } [Display(Name = "Manager", AutoGenerateFilter=false)] public object Employee1 { get; set; } } } ``` ```vb _ Public Class Employee Public Class EmployeeMD _ Public Property LastName As Object End Property _ Public Property Employee1 As Object End Property End Class End Class ``` ]]> An attempt was made to get the property value before it was set. Property System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 4.0.0.0 System.String Gets or sets a value that is used to display a description in the UI. The value that is used to display a description in the UI. property. Use the method instead. The property is typically used as a tooltip or description UI element that is bound to the member using this attribute. The Dynamic Data Edit.ascx template will display the description as a tooltip in text-entry fields. A `null` value or empty string is valid. ## Examples The following example shows how to set the property. ```csharp [MetadataType(typeof(EmployeeMD))] public partial class Employee { public class EmployeeMD { [Display(Name = "Last Name", Order = -9, Prompt = "Enter Last Name", Description="Emp Last Name")] public object LastName { get; set; } [Display(Name = "Manager", AutoGenerateFilter=false)] public object Employee1 { get; set; } } } ``` ```vb _ Public Class Employee Public Class EmployeeMD _ Public Property LastName As Object End Property _ Public Property Employee1 As Object End Property End Class End Class ``` ]]> Method System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 4.0.0.0 System.Nullable<System.Boolean> Returns the value of the property. The value of if the property has been initialized; otherwise, . To be added. Method System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 4.0.0.0 System.Nullable<System.Boolean> Returns a value that indicates whether UI should be generated automatically in order to display filtering for this field. The value of if the property has been initialized; otherwise, . To be added. Method System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 4.0.0.0 System.String Returns the value of the property. The localized description, if the has been specified and the property represents a resource key; otherwise, the non-localized value of the property. property is typically used as a tooltip for the property that is annotated with this attribute. ]]> The property and the property are initialized, but a public static property that has a name that matches the value could not be found for the property. Method System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 4.0.0.0 System.String Returns the value of the property. A value that will be used for grouping fields in the UI, if has been initialized; otherwise, . If the property has been specified and the property represents a resource key, a localized string is returned; otherwise, a non-localized string is returned. To be added. Both the property and properties were set, but a public static property with a name matching the value couldn't be found on the . Method System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 4.0.0.0 System.String Returns a value that is used for field display in the UI. The localized string for the property, if the property has been specified and the property represents a resource key; otherwise, the non-localized value of the property. property. A `null` value or empty string is valid. ]]> The property and the property are initialized, but a public static property that has a name that matches the value could not be found for the property. Method System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 4.0.0.0 System.Nullable<System.Int32> Returns the value of the property. The value of the property, if it has been set; otherwise, . property to 10000. This value lets explicitly-ordered fields be displayed before and after the fields that do not have a specified order. ]]> Method System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 4.0.0.0 System.String Returns the value of the property. The localized string for the property if the property has been specified and if the property represents a resource key; otherwise, the non-localized value of the property. property is typically used as a prompt or watermark for a UI element that is bound to the property that is annotated with the attribute. ]]> Both the property and properties were set, but a public static property with a name matching the value couldn't be found on the . Method System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 4.0.0.0 System.String Returns the value of the property. The localized string for the property if the property has been specified and if the property represents a resource key; otherwise, the non-localized value of the value property. is not `null`. ]]> Both the property and properties were set, but a public static property with a name matching the value couldn't be found on the . Property System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 4.0.0.0 System.String Gets or sets a value that is used to group fields in the UI. A value that is used to group fields in the UI. property. Use the method instead. A `null` value or empty string is valid. ]]> Property System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 4.0.0.0 System.String Gets or sets a value that is used for display in the UI. A value that is used for display in the UI. property. Use the method instead. The name is typically used as the field label for a UI element that is bound to the property that is annotated with this attribute. The Dynamic Data List.aspx, ListDetails.aspx, and Details.aspx page templates use the property for the field label. A `null` value or empty string is valid. ## Examples The following example shows how to set the name property. ```csharp [MetadataType(typeof(EmployeeMD))] public partial class Employee { public class EmployeeMD { [Display(Name = "Last Name", Order = -9, Prompt = "Enter Last Name", Description="Emp Last Name")] public object LastName { get; set; } [Display(Name = "Manager", AutoGenerateFilter=false)] public object Employee1 { get; set; } } } ``` ```vb _ Public Class Employee Public Class EmployeeMD _ Public Property LastName As Object End Property _ Public Property Employee1 As Object End Property End Class End Class ``` ]]> Property System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 4.0.0.0 System.Int32 Gets or sets the order weight of the column. The order weight of the column. _ Public Class Employee Public Class EmployeeMD _ Public Property LastName As Object End Property _ Public Property Employee1 As Object End Property End Class End Class ``` ]]> The getter of this property has been invoked but its value has not been explicitly set using the setter. Property System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 4.0.0.0 System.String Gets or sets a value that will be used to set the watermark for prompts in the UI. A value that will be used to display a watermark in the UI. method instead. ## Examples The following example shows how to set the property to "Enter Last Name". ```csharp [MetadataType(typeof(EmployeeMD))] public partial class Employee { public class EmployeeMD { [Display(Name = "Last Name", Order = -9, Prompt = "Enter Last Name", Description="Emp Last Name")] public object LastName { get; set; } [Display(Name = "Manager", AutoGenerateFilter=false)] public object Employee1 { get; set; } } } ``` ```vb _ Public Class Employee Public Class EmployeeMD _ Public Property LastName As Object End Property _ Public Property Employee1 As Object End Property End Class End Class ``` ]]> Property System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 4.0.0.0 [System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)] [<System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicProperties)>] [get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] [<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>] System.Type Gets or sets the type that contains the resources for the , , , and properties. The type of the resource that contains the , , , and properties. , , , and properties are assumed to be literal, non-localized strings. If this value is not `null`, the string properties are assumed to be the names of public static properties that return the actual string value. ]]> Property System.ComponentModel.Annotations 4.0.10.0 4.1.0.0 4.2.0.0 4.2.1.0 4.3.0.0 4.3.1.0 5.0.0.0 6.0.0.0 7.0.0.0 8.0.0.0 9.0.0.0 10.0.0.0 System.ComponentModel.DataAnnotations 2.0.5.0 4.0.0.0 System.String Gets or sets a value that is used for the grid column label. A value that is for the grid column label. for the field label. This property returns the localized string for if the property has been specified and if the property represents a resource key. If the property has not been specified or if the property is not a resource key, this property returns a non-localized string. ]]>