DisplayAttribute.Prompt Property
.NET Framework (current version)
Gets or sets a value that will be used to set the watermark for prompts in the UI.
Assembly: System.ComponentModel.DataAnnotations (in System.ComponentModel.DataAnnotations.dll)
This property is typically used as a prompt or watermark for a UI element that is bound to the property that is annotated with this attribute. Do not use this method to access the prompt string. Use the GetPrompt method instead.
The following example shows how to set the Prompt property to "Enter Last Name".
<MetadataType(GetType(EmployeeMD))> _ Public Class Employee Public Class EmployeeMD <Display(Name:="Last Name", Order:=-9, _ Prompt:="Enter Last Name", Description:="Emp Last Name")> _ Public Property LastName As Object End Property <Display(Name:="Manager", AutoGenerateFilter:=false)> _ Public Property Employee1 As Object End Property End Class End Class
Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 3.0
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 3.0
Show: