Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help Formatting Credit Number in Textbox Control
#7
Brandon,

All seems to be working fine. One problem though, I noticed that if the user made a mistake and tried to re-enter the textbox to correct the card number and exception is thrown - that the input format is wrong.

I traced the error back to the fact that since we already formatted to ####-####-####-####, the code is now taking that and trying to process it.

So I tried to resolve this by using the following code (both on the MouseClick and GotFocus events of TextBoxCard) to replace the dashes - but it didn't work.

Code:
TextBoxCard.Text.Replace("-", "")

Am I doing it wrong?
//Kismet


Messages In This Thread
Re: Help Formatting Credit Number in Textbox Control - by kismetgerald - 08-27-2012, 12:19 AM

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

Forum Jump:


Users browsing this thread: 1 Guest(s)