当前位置: 首页 > 工具软件 > Inputmask > 使用案例 >

Infragistics.WebUI.WebDataInput的InputMask属性说明

丁正阳
2023-12-01

官方网站说明


Default value is set to "CCCCCCCCCCCC".

The mask may contain literal characters and input-mask-flags such as

  • & - any keyboard character (entry is required)
  • L - letter (entry is required)
  • 0, # - digit (entry is required)
  • A - letter or digit (entry is required)
  • C - any keyboard character (entry is optional)
  • ? - letter (entry is optional)
  • 9 - digit (entry is optional)
  • a - letter or digit (entry is optional)
  • > - all letters to the right are converted to the upper case
  • < - all letters to the right are converted to the lower case
For information on how to customize input masks, see the following topic section of the help: Developer's Guide > The Toolset > Controls and Components > WebMaskEdit.

Notes:

  • If in front of any flag-character appears the "\" (escape) character, then that character becomes the literal part of mask. For example, if mask is set to the "A\A\BB\\##\99" and control has no data, then text in edit mode will appear as "_A\BB\#_9_". Where the "_" are available positions for entry.
  • To cancel upper/lower case convertion which was set by the > or < flag, that flag should be used one more time. For example, if mask is set to the ">CC->CC->CC" and user entered the "XxXxXx", then resulting text should appear as "XX-Xx-XX".
  • While control has no input focus, the optional empty mask positions are not displayed.


例子:

限制最长6位,数字
<igtxt:WebMaskEdit ID="txtPostCode" runat="server" InputMask="999999"></igtxt:WebMaskEdit>
限制最长18位,前17位数字,最后1位任意字符
<igtxt:WebMaskEdit ID="txtInsuranceNo" runat="server" InputMask="99999999999999999C"></igtxt:WebMaskEdit>

 类似资料: