📄 maskededit.aspx
字号:
<li><strong>MaskType</strong> - Type of validation to perform:<br />
None - No validation<br />
Number - Number validation<br />
Date - Date validation<br />
Time - Time validation<br />
DateTime - Date and time validation</li>
<li><strong>Mask Characters and Delimiters</strong><br />
9 - Only a numeric character<br />
L - Only a letter<br />
$ - Only a letter or a space<br />
C - Only a custom character (case sensitive)<br />
A - Only a letter or a custom character<br />
N - Only a numeric or custom character<br />
? - Any character<br />
<br />
/ - Date separator<br />
: - Time separator<br />
. - Decimal separator<br />
, - Thousand separator<br />
\ - Escape character<br />
{ - Initial delimiter for repetition of masks<br />
} - Final delimiter for repetition of masks<br />
<br />
<em>Examples:</em><br />
9999999 - Seven numeric characters<br />
99\/99 - Four numeric characters separated in the middle by a "/"</li>
<li style="visibility:hidden;"> </li>
<li><strong>AcceptAMPM</strong> - True to display an AM/PM symbol</li>
<li><strong>AcceptNegative</strong> - True if the negative sign (-) is allowed<br />
None - Do not show the negative sign<br />
Left - Show the negative sign on the left of the mask<br />
Right - Show the negative sign on the right of the mask</li>
<li><strong>AutoComplete</strong> - True to automatically fill in empty mask characters not specified by the user<br />
MaskType=Number - Empty mask characters will be filled with zeros<br />
MaskType=Time - Empty mask characters will be filled with the current time<br />
MaskType=Date - Empty mask characters will be filled with the current date<br />
MaskType=DateTime - Empty mask characters will be filled with the current date/time</li>
<li><strong>AutoCompleteValue</strong> - Default character to use when AutoComplete is enabled</li>
<li><strong>Century</strong> - Default century used when a date mask only has two digits for the year</li>
<li><strong>ClearMaskOnLostFocus</strong> - True to remove the mask when the TextBox loses focus</li>
<li><strong>ClearTextOnInvalid</strong> - True to clear the TextBox when invalid text is entered</li>
<li><strong>ClipboardEnabled</strong>- True to allow copy/paste with the clipboard</li>
<li><strong>ClipboardText</strong> - Prompt text to use when a clipboard paste is performed</li>
<li><strong>DisplayMoney</strong> - Specifies how the currency symbol is displayed<br />
None - Do not show the currency symbol<br />
Left - Show the currency symbol on the left of the mask<br />
Right - Show the currency symbol on the right of the mask</li>
<li><strong>ErrorTooltipCssClass</strong> - CSS class for the tooltip message</li>
<li><strong>ErrorTooltipEnabled</strong> - True to show a tooltip message when the mouse hovers over an invalid TextBox</li>
<li><strong>Filtered</strong> - Valid characters for mask type "C" (case-sensitive)</li>
<li><strong>InputDirection</strong> - Text input direction<br />
LeftToRight - Left to Right<br />
RightToLeft - Right to left</li>
<li><strong>MessageValidatorTip</strong> - Message displayed when editing in TextBox</li>
<li><strong>PromptChararacter</strong> - Prompt character for unspecified mask characters</li>
<li><strong>UserDateFormat</strong> - Custom date format</li>
<li><strong>UserTimeFormat</strong> - Custom time format</li>
<li style="visibility:hidden;"> </li>
<li><strong>OnFocusCssClass</strong> - CSS class used when the TextBox receives focus</li>
<li><strong>OnFocusCssNegative</strong> - CSS class used when the TextBox gets focus with a negative value</li>
<li><strong>OnBlurCssNegative</strong> - CSS class used when the TextBox loses focus with a negative value</li>
<li><strong>OnInvalidCssClass</strong> - CSS class used when the text is not valid.</li>
<li style="visibility:hidden;"> </li>
<li><strong>CultureName </strong>- Name of culture to use (overrides the default page culture)</li>
<li><strong>CultureAMPMPlaceholder</strong> - Culture override</li>
<li><strong>CultureCurrencySymbolPlaceholder</strong> - Culture override</li>
<li><strong>CultureDateFormat</strong> - Culture override</li>
<li><strong>CultureDatePlaceholder</strong> - Culture override</li>
<li><strong>CultureDecimalPlaceholder</strong> - Culture override</li>
<li><strong>CultureThousandsPlaceholder</strong> - Culture override</li>
<li><strong>CultureTimePlaceholder</strong> - Culture override</li>
</ul>
</asp:Panel>
<asp:Panel ID="description_HeaderPanel1" runat="server" Style="cursor: pointer;">
<div class="heading">
<asp:ImageButton ID="Description_ToggleImage1" runat="server" ImageUrl="~/images/collapse.jpg" AlternateText="collapse" />
MaskedEdit Validator Description</div>
</asp:Panel>
<asp:Panel ID="description_ContentPanel1" runat="server" Style="overflow: hidden;">
MaskedEditValidator is a custom validator which attaches to the MaskedEdit extender and its associated TextBox and verifies that the input text matches the pattern specified in the MaskedEdit extender.
Once associated with a validation group, server- and client-side validation can be performed and used to display messages.
</asp:Panel>
<asp:Panel ID="properties_HeaderPanel1" runat="server" Style="cursor: pointer;">
<div class="heading">
<asp:ImageButton ID="Properties_ToggleImage1" runat="server" ImageUrl="~/images/expand.jpg" AlternateText="expand" />
MaskedEditValidator Properties
</div>
</asp:Panel>
<asp:Panel ID="properties_ContentPanel1" runat="server" Style="overflow: hidden;" Height="0px">
The control above is initialized with this code. The <em>italic</em> properties are optional.
<pre><ajaxToolkit:MaskedEditValidator
ControlExtender="MaskedEditExtender2"
<em>ControlToValidate</em>="TextBox2"
<em>IsValidEmpty</em>="False"
<em>MaximumValue</em>="12000"
<em>EmptyValueMessage</em>="Number is required"
<em>InvalidValueMessage</em>="Number is invalid"
<em>MaximumValueMessage</em>="Number > 12000"
<em>MinimumValueMessage</em>="Number < -100"
<em>MinimumValue</em>="-100"
<em>EmptyValueBlurredText</em>="*"
<em>InvalidValueBlurredMessage</em>="*"
<em>MaximumValueBlurredMessage</em>="*"
<em>MinimumValueBlurredText</em>="*"
<em>Display</em>="Dynamic"
<em>TooltipMessage</em>="Input a number: -100 up to 12.000"/></pre>
<ul>
<li><strong>ControlToValidate</strong> - ID of the TextBox to validate</li>
<li><strong>ControlExtender</strong> - ID of the MaskedEditExtender attached to the TextBox</li>
<li style="visibility:hidden;"> </li>
<li><strong>AcceptAMPM</strong> - Whether or not AM/PM is accepted on times.<br />
The default value is false.</li>
<li><strong>ClientValidationFunction</strong> - Client script used for custom validation</li>
<li><strong>InitialValue </strong> - Initial value of the TextBox</li>
<li><strong>IsValidEmpty</strong> - True if the TextBox can be empty</li>
<li><strong>MaximumValue</strong> - Maximum value of the input</li>
<li><strong>MinimumValue</strong> - Minimum value of the input</li>
<li><strong>ValidationExpression</strong> - Regular expression used to validate the input</li>
<li style="visibility:hidden;"> </li>
<li><strong>TooltipMessage</strong> - Message displayed when the TextBox has focus with an empty value</li>
<li><strong>EmptyValueMessage</strong> - Message displayed when empty and TextBox has focus</li>
<li><strong>EmptyValueBlurredText</strong> - Message displayed when empty and TextBox does not have focus</li>
<li><strong>InvalidValueMessage</strong> - Message displayed when invalid and TextBox has focus</li>
<li><strong>InvalidValueBlurredMessage</strong> - Message displayed when invalid and TextBox does not have focus</li>
<li><strong>MaximumValueMessage</strong> - Message displayed when maximum value exceeded and TextBox has focus</li>
<li><strong>MaximumValueBlurredMessage</strong> - Message displayed when maximum value exceeded and TextBox does not have focus</li>
<li><strong>MinimumValueMessage</strong> - Message displayed when minimum value exceeded and TextBox has focus</li>
<li><strong>MinimumValueBlurredText</strong> - Message displayed when minimum value exceeded and TextBox does not have focus</li>
</ul>
</asp:Panel>
<asp:Panel ID="Opera_HeaderPanel" runat="server" Style="cursor: pointer;">
<div class="heading">
<asp:ImageButton ID="Opera_ToggleImage" runat="server" ImageUrl="~/images/expand.jpg" AlternateText="expand" />
MaskedEdit Known Issues
</div>
</asp:Panel>
<asp:Panel ID="Opera_ContentPanel" runat="server" Style="overflow: hidden;">
<p>
Opera's keyboard handling implementation causes the "." key to map to "Del" and the "Ins" key to map to "-".
</p>
</asp:Panel>
<ajaxToolkit:CollapsiblePanelExtender ID="cpeDescription" runat="Server"
TargetControlID="description_ContentPanel"
ExpandControlID="description_HeaderPanel"
CollapseControlID="description_HeaderPanel"
Collapsed="False"
ImageControlID="description_ToggleImage" />
<ajaxToolkit:CollapsiblePanelExtender ID="cpeProperties" runat="Server"
TargetControlID="properties_ContentPanel"
ExpandControlID="properties_HeaderPanel"
CollapseControlID="properties_HeaderPanel"
Collapsed="True"
ImageControlID="properties_ToggleImage" />
<ajaxToolkit:CollapsiblePanelExtender ID="CollapsiblePanelExtender1" runat="Server"
TargetControlID="description_ContentPanel1"
ExpandControlID="description_HeaderPanel1"
CollapseControlID="description_HeaderPanel1"
Collapsed="False"
ImageControlID="description_ToggleImage1" />
<ajaxToolkit:CollapsiblePanelExtender ID="CollapsiblePanelExtender2" runat="Server"
TargetControlID="properties_ContentPanel1"
ExpandControlID="properties_HeaderPanel1"
CollapseControlID="properties_HeaderPanel1"
Collapsed="True"
ImageControlID="properties_ToggleImage1" />
<ajaxToolkit:CollapsiblePanelExtender ID="CollapsiblePanelExtender3" runat="Server"
TargetControlID="Opera_ContentPanel"
ExpandControlID="Opera_HeaderPanel"
CollapseControlID="Opera_HeaderPanel"
Collapsed="False"
ImageControlID="Opera_ToggleImage" />
</asp:Content>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -