Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to validate a date in C#?
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01151376
Message ID:
01151563
Views:
21
>Simple question:
>
>I have an ASP.NET app where the user will enter a date range for a report.
>There are two textboxes for date from and to.
>
>I get the dates as text. I am adding a custom validator.
>What's the best/easiest way to test entered dates are valid? (C# 2.0)

By not allowing users to enter a date :) You could use the datetime picker (but I guess you should still validate just in case).
Semper ubi sub ubi.
Previous
Reply
Map
View

Click here to load this message in the networking platform