Date Validation in ASPNET

posted by Scudyen date: Thursday, May 22, 2008 category: ASP.NET
  Featured Story | Printable View | Email It | Comments | Write Comment

In this tutorial, we will try to validate some data coming from a form input. While using this sampel code will check the date is true and in correct format. We will compare the date within a culture date format. Code can do two jobs for us : date is valid and date is in correct format.


Dim dateFormat As New System.Globalization.CultureInfo("en-US", True)

try
articleDate = .Parse(txtInputField.Text, dateFormat)
Response.Write("Date is valid !")


Catch ex As Exception
Response.Write("Date is not valid")
End Try


Custom Search



Gazatem Technologies Active News Manager


page counter

Listed with 411asp.net
Listed with 4aspin.com
PHP, ASP, .NET, JSP Resources, Reviews