Fog Creek Software
Discussion Board

Welcome! and rules

Joel on Software

input mask

Is it possible for a Web Form text box control to have an input mask? So, for instance, for a phone number field the text box would automatically show (  )  -      We're already using the Regular expression validator to confirm a user is entering data the way we want, but is there any way to help them out with a mask as well?

Matt Bruce
Wednesday, February 4, 2004

You need DHTML to do this. For instance, I have some (really old!) example code on my site:

A number of people have wrapped things like this up into ASP.Net controls, but it outputs essentially the same code.

Aaron Boodman
Wednesday, February 4, 2004

*  Recent Topics

*  Fog Creek Home