Hi, I have developed the asp.net mvc 2 + C# application. it has create functionality in which there is datetime field. If locally I runs the a application it is working fine . but if i deploys it on IIS server (v 5.1) it, is not accepting date more than 12 (if gives 14/10/2010) will not work), this means it is changing the date format at run time on iis as MM/dd/yyyy. But in insert code I am converting the format in "dd/MM/yyyy" by this line :
objRecord.NextElectionDate = DateTime.ParseExact(collection["NextElectionDate1"], "dd/mm/yyyy", null);
I checked the regional settings , it is same as where i locally running application (US cultured) .Not any exception getting out.Also I tried to deploy application on iis 6.0 , where it is running perfect. But on client side there is IIS 5.1 version available so the application must be run somehow on IIS 5.1. Is this date problem cause of the IIS version. How to resolve this issue ?
Edited 1:
I have code like this :
Edited 2: Hi again ! while I am debugging the application I am getting ModelState.IsValid is "false" ,while trying to insert officer information on "Create" Action . how to know what is going wrong in ModelState.IsValid ? why should it is getting "false" ? Please guide