Hello
Assuming that the string length is validated to be 16 digits, you can format
it using this code
string formated = cc.Insert(12, "-").Insert(8, "-").Insert(4, "-");
where cc is the string holding the credit card number.
or better to avoid creating many strings
StringBuilder strbld = new StringBuilder(cc, 17);
string formated = strbld.Insert(12, '-').Insert(8, '-').Insert(4,
'-').ToString();
As for your second question about credit card validation tool, I don't know
it, sorry.
Regards
"Michelle A." <me@me.com> wrote in message
news:OS**************@tk2msftngp13.phx.gbl...
I have a form that takes in a credit card number, just a series of numbers
1234123412341234. When they get to the "Review" page and display all the
information a user has entered, I would like the number to be formatted in
a XXXX-XXXX-XXXX-1234 type of format.
Any good suggestions how to do this?
Anyone out there use that credit card validation tool from to MS downloads
for Visual Studio..? Easy..? Not worth the time?
Thanks.