Tags: Properties

Property prompt for Episerver

Today I discovered a feature I have never noticed before! You can add a placeholder, watermark, or (as Episerver calls it) a prompt to some properties.

[Display(Name = "String", Prompt = "Insert string...")]
public virtual string StringPrompt { get; set; }

[Display(Name = "DateTime", Prompt = "Insert DateTime...")]
public virtual DateTime DateTimePrompt { get; set; }

[Display(Name = "Int", Prompt = "Insert integer...")]
public virtual int IntPrompt { get; set; }

The prompt displays like this:

Three properties with prompt

There is no point in repeating the name (label) of the property as the prompt, but describing the expected format (or validation) of the property, could be useful in some scenarios.

Three properties with prompt indicating validation