Infragistics.WebUI.WebDataInput的InputMask属性说明

本文详细介绍了输入掩码编辑器的配置方法,包括如何设置默认值、使用各种标志字符、灵活定制输入规则,以及如何实现特定长度、类型和转换功能。通过实例展示了如何快速配置常见输入格式。

官方网站说明


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>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值