mlagrange
asked on
Getting "Input string was not in a correct format"
I just set up a GridView control on a new page, got the <columns> set up the way I need, and when I tried to "Edit" and "Update", I got the error message above.
I couldn't tell which field was causing the error, so I cut them all out of the control, except for a few text fields that already had values, and started adding them back one at a time to see which was the problem field.
The fields I added back were of assorted data types (text, date, currency, yes/no), and the page was working fine after each restored field.
But finally, when I added back a field that was just a straight number, I got the error.
And when I took that column back out, I STILL got the error!
Any ideas what the problem is?
Thanks
Mark
I couldn't tell which field was causing the error, so I cut them all out of the control, except for a few text fields that already had values, and started adding them back one at a time to see which was the problem field.
The fields I added back were of assorted data types (text, date, currency, yes/no), and the page was working fine after each restored field.
But finally, when I added back a field that was just a straight number, I got the error.
And when I took that column back out, I STILL got the error!
Any ideas what the problem is?
Thanks
Mark
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, DreamMaster - when I looked back at the field type in the database, it was different than what I thought it was.
You are very welcome indeed.
Glad to have been helpfull,
Regards,
Max.
Glad to have been helpfull,
Regards,
Max.
If you used data Reader, then you might have used GetString() for all. Is this the case?