Skip to content

PlaceholderAttribute class

namespace: Serenity.ComponentModel   assembly: Serenity.Net.Core

Sets a placeholder for a form field. Placeholder text is shown inside the editor when its value is empty. Only editors using basic inputs and the Select2 editor support this.

[AttributeUsage(AttributeTargets.All)]
public class PlaceholderAttribute : Attribute, IHasTextKey
parameter description
value The value.

Public Members

name description
PlaceholderAttribute() Initializes a new instance of the PlaceholderAttribute class with no placeholder text. Maybe used to specify a TextKey instead.
PlaceholderAttribute(…) Sets a placeholder for a form field. Placeholder text is shown inside the editor when its value is empty. Only editors using basic inputs and the Select2 editor support this.
TextKey { get; set; } Gets or sets the local text key for the placeholder text.
Value { get; } Gets the value.

Remarks

Initializes a new instance of the PlaceholderAttribute class.

See Also