Databinding int32 to MaskedEditExtender enabled TextBox

让人想犯罪 __ 提交于 2019-12-07 23:32:29

Problem could be that you're not using "Escape Characters" for your "(", ")", and "-".

Might want to change your mask from

Mask="(999)999-9999"

to

Mask="\(999\)999\-9999"

According to the documentation, there is no "(", ")", or "-", so you may be telling it to do something unintended. From the section on masks...

/ - Date separator

: - Time separator

. - Decimal separator

, - Thousand separator

\ - Escape character

{ - Initial delimiter for repetition of masks

} - Final delimiter for repetition of masks

Examples

9999999 - Seven numeric characters

99/99 - Four numeric characters separated in the middle by a "/"

http://www.asp.net/ajaxlibrary/act_MaskedEdit.ashx

I had the same issue, and what solved it for me was changing the MaskedEditExtender's property
"ClearMaskOnLostFocus" to True.

I had the same issue too, and :

  1. Doing despecialisation in the mask like :

        Mask="\(999\)999\-9999",
    
  2. With ClearMaskOnLostFocus set to true.

Solved the problem.

Thanks for all.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!