08-24-2012, 09:09 AM
Hey guys,
I am building an in-house application to store all our customer credit card information in a MySQL database. What I want to do is to take user input of the Credit Card number without any formatting (eg., 1111222233334444) and format it based on the Card Type selected by the user.
TASK #1: FORMAT CREDIT CARD NUMBER
I've tried the following to do the first part, but when I debug the formatted number shows up as ####-####-####-#### instead of the number with dashes.
TASK #2: DETECT CARD TYPE
Based on the card number entered, I want the application to auto-select the card type from a read-only combobox. I'm not sure how to go about this. The different types of credit card number formats are listed here: http://www.wysiwyg.co.il/Anatomy-of-Cred...ormats.asp
Your help would be most appreciated, thanks.
I am building an in-house application to store all our customer credit card information in a MySQL database. What I want to do is to take user input of the Credit Card number without any formatting (eg., 1111222233334444) and format it based on the Card Type selected by the user.
TASK #1: FORMAT CREDIT CARD NUMBER
I've tried the following to do the first part, but when I debug the formatted number shows up as ####-####-####-#### instead of the number with dashes.
Code:
TextBoxCard.Text = Format(TextBoxCard.Text, "#### #### #### ####")
TASK #2: DETECT CARD TYPE
Based on the card number entered, I want the application to auto-select the card type from a read-only combobox. I'm not sure how to go about this. The different types of credit card number formats are listed here: http://www.wysiwyg.co.il/Anatomy-of-Cred...ormats.asp
Your help would be most appreciated, thanks.
//Kismet