Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help Formatting Credit Number in Textbox Control
#1
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.

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


Messages In This Thread
Help Formatting Credit Number in Textbox Control - by kismetgerald - 08-24-2012, 09:09 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Custom tab control help and making controls Derek275 4 19,959 11-16-2012, 09:51 AM
Last Post: Snake_eyes
  Winsock Control Covert2String 7 23,673 11-27-2011, 08:57 PM
Last Post: brandonio21
  Custom Tab Control xolara 5 19,214 04-24-2011, 07:12 PM
Last Post: xolara

Forum Jump:


Users browsing this thread: 1 Guest(s)