First, Am putting 3 textboxes and 1 button, and giving some numbers to first two textboxes. If we click button then the value(sum) of first two textboxes will be displayed in the third textbox.
I want code.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Santhi GPosted Feb 1, 2006, 6:35 AM
sudheer panwarPosted Jan 31, 2006, 4:05 AM
if
(textBox1.Text.Trim() != string.Empty && textBox2.Text.Trim() != string.Empty ){
int sum = int.Parse(textBox1.Text.Trim())+ int.Parse( textBox2.Text.Trim());textBox3.Text = sum.ToString();
}
Santhi GPosted Jan 31, 2006, 2:36 AM
cannot implicitly convert type 'int' to 'string' .
Ashish SinghalPosted Jan 30, 2006, 8:00 AM