08-27-2012, 12:19 AM
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.
Am I doing it wrong?
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