Format TextBox on an ASP.NET Web Page

  • Thread starter Thread starter Greg
  • Start date Start date
G

Greg

I come from an Access background. In Access I was able to format certain
types of data such as SSN, Date, Phone Number, etc. with the special
characters during data-entry and display, but the special characters were not
saved.

I don't seem to be able to find a similar option for the ASP.TextBox control.

I know I can use a Validation control to ensure data is entered in the
proper format, but I don't want to force my users to enter special
characters. I'd like the web page to do that same as Access does.

How can I achive the formatting I am looking for?

Thanks.
 
Greg,

What you are talking about is called a "Mask"

Your best bet is to use the MaskEditExtender from the AjaxToolKit.
There are also some third party controls you can use, or write lots of
Javascript that first on the keypress event.

L. Lee Saunders
http://oldschooldotnet.blogspot.com
 
There's a bunch of Masked Edit Controls from various vendors I would
consider before moving to AJAX as its a new learning curve you may not be
prepared for yet.
 
Back
Top