marcivry
asked on
Formatting SS#
Need to format Social Security number but the DataFormatString is not cmoing out right... I have {0:###-##-####}. The value in the DB is just a number, no dashes, but I want to display it as a SS#. I formatted the dates to show MM-dd-yyyy, so why isn't the SS# coming up?
Where should your SS# appear? GridView?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
So, How should I code it? Is it within the script tags or should i do a code behind?
int ss = 123456789;
string formattedSS = string.Format("{0:###-##-#
Or in VB:
Dim ss As Integer = 123456789
Dim formattedSS As String = String.Format("{0:###-##-#