How to mask all put last 4 digits of credit card?

2 posts, 0 answers
  1. Scott Marx
    Scott Marx avatar
    38 posts
    Member since:
    Apr 2010

    Posted 07 Mar 2011 Link to this post

    How would you use RadMaskTextBox to mask all but the last 4 digits of a credit card?

    I want the Textbox to display as ####-####-####-1234.

    Thanks in advance for your assistance.
  2. Veli
    Admin
    Veli avatar
    2002 posts

    Posted 11 Mar 2011 Link to this post

    Hello Scott,

    This scenario is not supported. You cannot show both prompt characters and portions of values at the same time in RadMaskedTextBox. You can use custom javascript to implement that based on your scenario. If you share with us what exactly you are trying to implement, we may be able to advise you further. Do you need this format only for showing the last four digits of a credit card number, or also for entering such numbers? If you are only showing them to the user, and they come from the server, do you need to transfer the whole credit card number, or only the last four digits? Note that, if you send the entire number over to the client, it can be read from the markup even though it may not be visible in the textbox. Clarifying these aspects would help.

    Veli
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top