databind format social security number

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Keith G Hicks

    databind format social security number

    I cannot find anything on how to format a social security number in the
    databinding property of a text box. Everything in the drop down is
    preformatted like {0:D} or {0:C}. I cannot find any examples. I just want to
    take a 9 digit number and put the hyphens in.

    I have this: 987654321 and want to show this: 987-65-4321 using the
    Bind("SSN", ?????????) property.

    Here's one thing I tried but it didn't work:

    <%# Bind(&quot;SSN& quot;, &quot;{0:'## #-##-####'}&quot;) %>

    I'd appreciate someone showing me exactly what I need to use instead of the
    above to make this work.

    Keith


Working...