The code below is for a mini calculator that add two numbers entered in the two text boxes. I am using visual web developer 2005 express to develop. But it's always showing errors that "Operand1TextBox.Text and Operand2TextBox.Text are not declared"
Protected Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs)
End Sub
Protected Sub AddButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim op1, op2, result As Single
op1 = Convert.ToSingle(Operand1TextBox.Text)
op2 = Convert.ToSingle(Operand2TextBox.Text)
result = op1 + op2
resultLabel.Text = result.ToString()
End Sub
!--removed tag-->
Enter your message below
Sign in or Join us (it's free).