String was not recognized as a valid DateTime???

D

Dennis McCarthy

I have an aspx page that contains a GridView which is data bound to an
ObjectDataSource. The ObjectDataSource is calling the class generated by a
web reference. When the page loads and the ObjectDataSource calls a method
in the web reference class, I get the exception included below. The
ObjectDataSource is getting the date from a Calendar control, so it is valid.

How can I set a breakpoint in the client proxy method that is generated for
the web reference, so that I can see the value. There is no source code file
added to my project when I add the web reference.

Thanks,
Dennis

String was not recognized as a valid DateTime.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.FormatException: String was not recognized as a
valid DateTime.

Source Error:


Line 161: [return:
System.Xml.Serialization.XmlArrayItemAttribute("Incident",
Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=false)]
Line 162: public IncidentType[]
GetIncidentsByEmployeeAndRange([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified,
DataType="integer")] string EmployeeID,
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified,
DataType="date")] System.DateTime StartDate,
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType="date")] System.DateTime EndDate) {
Line 163: object[] results =
this.Invoke("GetIncidentsByEmployeeAndRange", new object[] {
Line 164: EmployeeID,
Line 165: StartDate,
 

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

Members online

No members online now.

Forum statistics

Threads
473,967
Messages
2,570,148
Members
46,694
Latest member
LetaCadwal

Latest Threads

Top