Printable Version
 Updates

 Documentation

 Support & Training

 Community
  Online Forum
  Newsgroups
Specifying Number Formats

Products:   
Areas: ASP, ASP.NET(C#), ColdFusion, Java Servlets, JSP, Perl, Perl 

For form controls whose values are of data type integer or float, you can use the Format property of the control to specify how the value should appear when displayed on the page. When using the Format property, there are two main characters that make up the format mask:

0 Represents a digit that is required
# Represents an optional digit or space

The following table shows some example usage of both characters. If the format mask contains other characters other than 0 and #, they are interpreted literally and appear in the displayed value as-is.

Format Value Display
000-000-0000 123456789 012-345-6789
###-###-#### 123456789 12-345-6789
a000-b000-c0000 123456789 a012-b345-c6789
a###-b###-b#### 123456789 a12-b345-b6789



Viewed 12427 times.   Last updated: 12/12/2002 12:00:08 AM