Default TextBox

This example demonstrates the Bootstrap Text Box control with default settings. The Bootstrap Text Box control is a single-line text editor.

<dx:BootstrapTextBox runat="server" Text="Sample Text">
</dx:BootstrapTextBox>

Null Text

This demo illustrates how the NullText property can be used to display prompt text (watermark) in the editor's edit box. Specified text is displayed when the value of the editor is null and the editor is not focused. The prompt text disappears when the editor receives focus.

<dx:BootstrapTextBox runat="server" NullText="Enter Your Name">
</dx:BootstrapTextBox>

Mask

In this example, the Text Box control takes advantage of the masked input feature to only accept values formatted as phone numbers. The mask is specified using the MaskSettings.Mask property.

<dx:BootstrapTextBox runat="server">
    <MaskSettings Mask="+1 (999) 000-0000" IncludeLiterals="None" ErrorText="Please input missing digits" />
</dx:BootstrapTextBox>

Display Format

The DisplayFormatString property specifies the pattern used to format the value of an editor for display purposes when the editor is not focused. Display values can be formatted using the standard formatting mechanism described in MSDN. For more information about composing format patterns, see the following MSDN topic: Formatting Types.

<dx:BootstrapTextBox runat="server" Text="12345" DisplayFormatString="[ 00 - 00 - 00 ]">
</dx:BootstrapTextBox>

Caption and HelpText

In this example, the Text Box control displays a caption on the top and auxiliary help text at the bottom of the editor.

<dx:BootstrapTextBox runat="server" Caption="First Name" HelpText="Enter your first name">
    <ValidationSettings RequiredField-IsRequired="true"></ValidationSettings>
</dx:BootstrapTextBox>
Screen Size
Color Themes
Demo QR Code