Hide

YetaWF Documentation

Display
Print

Text Component

Text (Display)

Displays the model using a disabled Text box. In most cases the use of the String Component is preferred over the Text Component for display purposes.

Model Type: string

AdditionalMetadata Attributes

NameTypeDefaultDescription
CopybooltrueDefines whether a copy icon is displayed to allow the user to copy the contents to the clipboard and the text box is rendered read/only as opposed to disabled. If false is specified, no copy icon is shown.
ReadOnlyboolfalseDefines whether the text box is rendered read/only as opposed to disabled.
[Caption("Category"), Description("The name of this blog category")]
[UIHint("Text"), ReadOnly]
public string Category { get; set; }

Text (Edit)

Allows entry of a string. Renders a text box.

Model Type: string

If the StringLengthAttribute is specified for the model, the Text box is limited to the specified number of characters.

AdditionalMetadata Attributes

NameTypeDefaultDescription
CopybooltrueDefines whether a copy icon is displayed to allow the user to copy the contents to the clipboard and the text box is rendered read/only as opposed to disabled. If false is specified, no copy icon is shown.
ReadOnlyboolfalseDefines whether the text box is rendered read/only as opposed to disabled.
AutoCompletestringnullDefines the optional autocomplete attribute.

Sibling Properties

NameTypeDescription
model__PlaceHolderstringDefines the placeholder text shown when control contents are empty.
[Caption("Title"), Description("The title for this blog entry")]
[UIHint("Text"), StringLength(BlogEntry.MaxTitle), Required, Trim]
public string Title { get; set; }