ObjectDataSource fails to parse string to DateTime
问题 I have a textbox with value that stores ValidFrom form value: 31.01.2012 and cultures set to: <globalization culture="en-GB" uiCulture="en-GB"/> in web.config. And now, ObjectDataSource update method: public static void UpdateLac(int id, DateTime ValidFrom) { /// ... } fails as I get exception that string cannot be parsed. However date in format dd.mm.yyyy ( 31.01.2012 ) is valid en-GB format and can be parsed (as far as I know). I have tested it with following code: DateTimeFormatInfo dtfi =