Navigation

Search

Categories

On this page

Archive

Blogroll

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 13
This Year: 0
This Month: 0
This Week: 0
Comments: 0

Sign In
Pick a theme:

# Monday, January 29, 2007
Monday, January 29, 2007 4:53:54 PM UTC ( ASP.Net Controls )

To make an ASP.NET control validator recognize an alternate date format such as DD/MM/YYYY, set the culture at the page level with:

Page.Culture = "en-AU";

This will set the validators for Australian English, and the following validator will work correctly:

<asp:CompareValidator ID="cvStartDate" runat="server" ControlToValidate="txtStartDate" ErrorMessage="The From Date should be in the format DD/MM/YYYY." Operator="DataTypeCheck" Type="Date">*</asp:CompareValidator>

OpenID
Please login with either your OpenID above, or your details below.
Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, blockquote@cite, strike, strong) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview