Thursday, March 22, 2012

Mask Control

Hi

I want to use the masked edit control. I am new to asp.net. I am familir with masked edit control in VB. But here the properties are completely different. Can anybody help me with the properties?

Thank youRemember that within the browser world, you are dealing with HTML, JavaScript and the DHTML or DOM objects that describe the page loaded into the browser. You are limited to their featureset.
There is no HTML tag for masked edit controls. The <input type='text'> and <textarea> tags are your text entry fields and they allow every character.
With DHTML and DOM, you can attach a keystroke filter that to the onkeypress and onkeydown events. There is a lot to learn in these technologies. So if your goal is to get the job done, you may want to use a third party solution.
One of the key problems with masked textboxes on browsers is that DHTML (used by Internet Explorer) does not tell you where the start and end of the selection is. So masked textboxes can still be messed up when the user selects a range and then types.
As a result, I recommend:
* Use a normal textbox
* Establish a keystroke filter that allows a specific characterset (this is actually optionally and just assists the user; after all, javascript can be turned off and your web app should handle it)
* Use a RegularExpressionValidator that complains when the user does not enter the text correctly.

FYI: I sell products that include filtered TextBoxes where you can define the character set, for numeric entry, for date entry and for time entry.
Hi,

and welcome to the forums.

There's a freely downloadablemasked textbox available.

Grz, Kris.

0 comments:

Post a Comment