Input string was not in correct format ?
i have problem in my cash counter application. i have one textbox which client entered code of products. application working perfectly but after somedays i have seen this error " input string was not in correct format' although i have blocked all characters down the textbox how can this happen i dont know ? help plz!
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Aug 23, 2012, 4:55 AM EDT
Jignesh TrivediRank #16 · 50.3K reputationPosted Aug 23, 2012, 7:46 PM EDT
I think this problem occurs when u try to convert non numeric or empty string into integer in your application.
I think it would better first you validate the input using regex or other way and convert it.
hope this will help you.