hi ,
I am getting error while subtracting values in three text boxes and displaying it on label.
Error:
Exception Details: System.FormatException: Input string was not in a correct format. Line 89: Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Line 90: Dim a As Integer Line 91: a = (Convert.ToInt32(TextBox1.Text) - Convert.ToInt32(TextBox2.Text)) - Convert.ToInt32(TextBox3.Text) Line 92: Label4.Text = a.ToString() Line 93: End Sub
The Code:
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim a As Integer a = (Convert.ToInt32(TextBox1.Text) - Convert.ToInt32(TextBox2.Text)) - Convert.ToInt32(TextBox3.Text) Label4.Text = a.ToString() End Sub