Fri Apr 08, 2011 10:01 pm
<form method ="post" action="<%= Request.ServerVariables("SCRIPT_NAME") %>">
Enter your birthday :<input type ="text" name="inputdate" size="40" id="inputdate "><br>
<input type="submit" value="validate">
</form>
<%
Dim strDate, blnDateIsValid, createdDate
If Request.ServerVariables("CONTENT_LENGTH") <> 0 Then
strDate = Trim(Request.Form("inputdate"))
' use isDate function for validation
If isDate(strDate) Then
createdDate = CDate(strDate)
' date is valid
blnDateIsValid = True
Else
' invaild date.
Response.Write(strDate & " is <b>invalid date</b>")
End If
' valid date.
If blnDateIsValid = True Then
Response.Write(strDate & " is <b>valid date</b>")
End If
End If
%>
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.