I wrote an input mask control some years ago which I later converted into an ASP.Net control. I'm not entirely proud of the control. Fortunately I've found an alternative to my control developed by Assisted Solution, which is available
here.
A demo of the mask control in action can be found
here.
While it lacks some of the features of the control I wrote I'd much rather use this
one.