how to resolve this error "Input string was not in a correct format."
by using this code
TextBox3.Text = Convert.ToString(Convert.ToDouble(TextBox1.Text) + Convert.ToDouble (TextBox2.Text)* 0.001);
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Ranjan DailataRank #819 · 2.8K reputationPosted Mar 18, 2016, 5:35 AM EDT
Amit Kumar SinghRank #562 · 4.3K reputationPosted Mar 16, 2016, 9:26 PM EDT
ramya t115 reputationPosted Mar 16, 2016, 9:29 PM EDT
Amit Kumar SinghRank #562 · 4.3K reputationPosted Mar 16, 2016, 9:31 PM EDT
ramya t115 reputationPosted Mar 16, 2016, 9:55 PM EDT
Amit Kumar SinghRank #562 · 4.3K reputationPosted Mar 16, 2016, 9:59 PM EDT
Shweta LodhaRank #31 · 39.8K reputationPosted Mar 16, 2016, 10:04 PM EDT
Hi ramya t,
You will get such error only when you are not giving numeric value in textbox 1 and 2. Please tell me, what input are you supplying in your textboxes.
ramya t115 reputationPosted Mar 16, 2016, 10:08 PM EDT
Shweta LodhaRank #31 · 39.8K reputationPosted Mar 16, 2016, 10:11 PM EDT
what do you mean by 'may be'?
Could you please share some sample values for textbox 1?
ramya t115 reputationPosted Mar 16, 2016, 10:22 PM EDT
ramya t115 reputationPosted Mar 18, 2016, 10:03 PM EDT