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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Jul 3, 2013, 4:56 AM
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.
Tan Kai KaiPosted Jul 3, 2013, 4:31 AM
VulpesPosted Jul 2, 2013, 11:10 AM
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
Sanjeeb LenkaPosted Jul 2, 2013, 10:48 AM
http://www.w3resource.com/javascript/form/credit-card-validation.php
Tan Kai KaiPosted Jul 2, 2013, 10:43 AM
VulpesPosted Jul 2, 2013, 10:21 AM