Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Unable to subtract values in three text boxes and display in label

$
0
0

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






Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>