Newbie question, C #
Sorry for my bad english. But I was wondering if someome could help me out with an issue with C #. I want to make two textboxes where I can type two numbers. Then press a button and they wil be added togheter. When I make this, something happens wrong. Do I have to convert textboxes to int? How to?
I want it to be 5+5=10
And I also have one more question. If I make a question, (with dropdownlist and a button that says "Next". When pressing this button I want a new question to appear. How to make a new "site" with a new question?
Thanks for any answers.
Hello, it's better to post this question in the C # subforum.
Moved to C# Programming forum.
int res = 0;
Int32.TryParse(this.textBox1.Text, out res);
"5" + "5" = "55"
5 + 5 = 10
The problem you're having is you are adding two strings together, or rather you're joining two strings together.