<HTML> <HEAD> <TITLE>Credit Card Validation</TITLE> </HEAD> <BODY> <H2>Validate your credit card using an ASP server component.</H2> <% IF NOT IsEmpty(Request.Form("CardNumber")) ;THEN SET tsString = Server.CreateObject( ;"TarsusTS.StringUtils" ) Result = tsString.CheckCard( ;Request.Form("CardNumber"), ;CInt(Request.Form("CardType")) ) SET tsString = NOTHING IF Result > "" THEN Response.Write("The card number you ;entered is not valid<P>") ELSE Response.Write("The card number you ;entered is valid<P>") END IF END IF %> <FORM action=default.asp method=post> <P> Card Type: <SELECT name=CardType> <OPTION selected value=1>American Express <OPTION value=2>Visa <OPTION value=3>MasterCard <OPTION value=4>Discover </SELECT> <BR> Card Number: <INPUT Type=Password Name=CardNumber Size=16> <P> <INPUT type=submit value="Submit"> </FORM> </BODY> </HTML>