Validation for mastercard
Need help Validation for Credit Card in asp.net for C#
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
VulpesRank #55 · 29.2K reputationPosted Jul 2, 2013, 6:21 AM EDT
Tan Kai Kai114 reputationPosted Jul 2, 2013, 6:43 AM EDT
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Jul 2, 2013, 6:48 AM EDT
http://www.w3resource.com/javascript/form/credit-card-validation.php
VulpesRank #55 · 29.2K reputationPosted Jul 2, 2013, 7:10 AM EDT
However, in addition to this, you can further reduce the chances that it's an invalid card number by checking that it's consistent with the LUHN algorithm.
See the link below for how to do this:
http://www.superstarcoders.com/blogs/posts/luhn-validation-for-asp-net-web-forms-and-mvc.aspx
Tan Kai Kai114 reputationPosted Jul 3, 2013, 12:31 AM EDT
Jignesh TrivediRank #16 · 50.3K reputationPosted Jul 3, 2013, 12:56 AM EDT
hi,
there is regex validation control in asp.net, this can be use to validate Master card number.
in Regex validation control, you must put your regex in ValidationExpression property.
Please refer following link to know more about it.
http://msdn.microsoft.com/en-us/library/ff650303.aspx
hope this will help you.