Export (0) Print
Expand All

DisplayAttribute.Prompt Property

Gets or sets either a resource name or non-localized text, such as a watermark, that suggests a user action for an element that is bound to the member.

Namespace:  System.ComponentModel.DataAnnotations
Assembly:  System.ComponentModel.DataAnnotations (in System.ComponentModel.DataAnnotations.dll)

public string Prompt { get; set; }

Property Value

Type: System.String
Either a resource name or the non-localized text that suggests a user action for an element that is bound to the member. The resource name is used with the ResourceType property to retrieve localized text that suggests a user action for an element that is bound to the member.

Set the Prompt property to either a literal non-localized string or to a resource key to use with the ResourceType property to specify a localized prompt.

Do not use the get accessor of the Prompt property to retrieve the text to display in your Silverlight application. Instead, use the GetPrompt method to retrieve the prompt to display. The GetPrompt method returns either the literal non-localized string or the localized string when a resource type is specified.

Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft