Export (0) Print
Expand All

MaskedTextBox.AllowPromptAsInput Property

Gets or sets a value indicating whether PromptChar can be entered as valid data by the user.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

public bool AllowPromptAsInput { get; set; }
/** @property */
public boolean get_AllowPromptAsInput ()

/** @property */
public void set_AllowPromptAsInput (boolean value)

public function get AllowPromptAsInput () : boolean

public function set AllowPromptAsInput (value : boolean)

Not applicable.

Property Value

true if the user can enter the prompt character into the control; otherwise, false. The default is true.

Even when AllowPromptAsInput is true, the prompt character must be valid for the current location in the mask in order to be accepted. For example, if PromptChar is "*", and the current location in the mask demands the user enter a digit, entering an asterisk (*) will fail and cause the MaskInputRejected event to occur.

The ResetOnPrompt property takes precedence over AllowPromptAsInput.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft