Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to validate a date in C#?
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01151376
Message ID:
01151563
Vues:
22
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform