BloggingAbout.NET
Thoughts of developers
ASP.NET ObjectDataSource and localization bug?

As a proud owner of Windows XP NL (Dutch version) I tried out a few tricks yesterday with the new fancy ObjectDataSource in ASP.NET.
I bound a class to a gridview that contained several properties with one of them having a DateTime type.

Showing the values of my object (using nHibernate) in the gridview worked like a charm, but updating the values was problematic.
I got stuck with an error that my DateTime field could not be converted from System.String to System.DateTime.

Then I added some localization settings in my web.config that set the currentCulture and currentUiCulture on nl-NL.
But still the same error. Then I tried to set the culture settings on en-US and guess what.......it worked!
Okay, my DateTime field was now shown in US format and not in NL format but at least updating works now.

So it seems that the ObjectDataSource has a nasty localization bug!


Posted Thu, Dec 22 2005 11:03 AM by Fijsjan Heijkoop

Comments

Flo wrote re: ASP.NET ObjectDataSource and localization bug?
on Fri, Feb 17 2006 1:50 AM
Ever found a solution to this bug?
Ynijsen wrote re: ASP.NET ObjectDataSource and localization bug?
on Mon, May 21 2007 12:39 PM

Ever realized your .NET framework versions weren't compatible....

Add a Comment

(required)  
(optional)
(required)  
Remember Me?

Please add 7 and 8 and type the answer here:
Copyright © 2003-2010 BloggingAbout.NET