ok, here is the relevant code. The goal is to take the input, convert it to a number variable, do some math on it and, send that info back to the form. It works so far as when you enter a number in the text box, the program converts it to an int, adds 10 and sends it to the form. The issue is if you enter a number and then backspace until there is nothing in the text box, it throws an error.
My guess is that it is because 'null' is not something that can be converted to an int. Would the solution be to add an if statement that checks for the null character and sets the foo variable to 0?