« Home | How Does OpenID Work? » | Facebook dev, IIS 5.1, and error 405 » | Creating Your Own Dev SSL Cert for IIS » | Moving from ASP.NET 1.1 to 2.0 » | Link Drop VI » | Silverlight createFromXaml Bug » | C# command line parser? » | Firefox extension: CookiePie » | Hand-held browser » | Silverlight » 

Monday, February 18, 2008 

ObjectDataSource DateTime, and Locale

Thinking of using an ObjectDataSource and DetailsView to populate/save your business object? If the object has a DateTime property - lets hope you live in the United States!

Had an strange problem today with a birthday set to October 9, 1940. The edit screen would populate a TextBox with "9/10/1940", correct for my culture en-AU. Clicking save populates the database with "September 10, 1940". Strange the edit screen would observe the my culture settings, yet populating the business object doesn't.

Googling around turned up this: ObjectDataSource ignores culture information when updating. Do'h!

Labels: