View Single Post
  #1 (permalink)  
Old January 20th, 2006, 10:56 AM
toiletgraffiti toiletgraffiti is offline
Registered User
 
Join Date: Jan 2006
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default textboxes and additions


Hi

Im having difficulty figuring out how to sum the values a user enters into 5 textboxes. I want a total to appear in a 'total' textbox. Its a windows application in c#.

My code so far is:

txtTotal.Text = (txtShare1.Text+txtShare2.Text+txtShare3.Text+txtS hare4.Text+txtShare5.Text);

All this does is concatenate the vlaues rather than summing them...Im sure this is very simple I just cant figure out the syntax!

Any help greatly appreciated.
tg.

Reply With Quote