Thursday, March 22, 2012

mask a textbox and validate on client side

Hello everyone

I'm looking for a tool or software that can assist me to minimize my work. I want to buil a lot of textboxes and want to mask all of those in a format I want. Also I want to validate this textbox immdediately on client side.

I don't know if somebody here know where I can purchase or download this tool

ThanksYou can find a textbox like that that anywhere really, probably many for free. I attached one of my own creations below (not for resale unless part of a larger solution. In other words, don't try selling the textbox itself.), which includes a RegEx property, and a Required property.

You really just need to inherit the default Web.UI.Textbox or WebControl in a class, and make a public property called RegEx which takes a string.

You can store the RegEx passed to the property in a a RegularExpressionValidator (which you create in OnCreateChildControls). If the input value fails the RegEx, it cancels the onSubmit event.

Have at the attached file (btw you may not sell the textbox or claim it as your own)

0 comments:

Post a Comment