date format check

  • Thread starter Ricardo Silveira
  • Start date
R

Ricardo Silveira

I'm validating a text box using a Compare Validator Component with the
folowing properties:
Operator = DataTypeCheck
Type= Date

But the web application is validating an english format date (mm/dd/yyyy)
and I need to validate in a portuguese format (dd/mm/yyyy).

Any sugestion how to change the date format check?

Thanks

Ricardo.
 
M

Martin Marinov

before validating the inputed data set the culture info for the current
thread to be your
Thread.CurrentThread.CurrentCulture = new
System.Globalization.CultureInfo("pt")

Regards
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top