How do I update a label with the summary total of six textboxes?
From: Karen Grube (KarenGrube_at_discussions.microsoft.com)
Date: 10/22/04
- Next message: Wessam Zeidan: "Re: REPOST: Need help locating a web date control with popup calendar"
- Previous message: ree32: "Finding out which Control was activated"
- Next in thread: Ken Cox [Microsoft MVP]: "RE: How do I update a label with the summary total of six textboxes?"
- Reply: Ken Cox [Microsoft MVP]: "RE: How do I update a label with the summary total of six textboxes?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 21 Oct 2004 21:09:02 -0700
Hi!
I have a web page containing 6 text boxes placed one below the other in a
column. Each textbox accepts only numeric input and is formatted and
validated as numeric.
As I'm entering each amount, I need to display the summary total of the
amounts that have been entered in a label below the column. I can't seem to
be able to do that! All I want to do is update the text value of the label.
I want for the value of the total to change as the individual amounts are
entered. Below, I'm showing three columns, but really, this is just one
column showing what happens as each of the three amounts is entered.
ENTRY1 ENTRY2 ENTRY3
120.00 120.00 120.00 <---- This is textbox1
240.00 240.00 <---- This is textbox2
230.50 <--- This is textbox3
120.00 360.00 590.50 <--- This is the label I need
to update.
For each of the text boxes, I'm calling the TextChanged event, recalculating
the total and then setting the label text to the string formatted value of
the total. However, the new amount is never displayed on the screen.
Initially, the value of the total is set to zero, and that displays, but is
never updated as the amounts are entered.
These are completely unbound controls, by the way. Do I need to be binding
the label to something or do something in the html code to get the total to
display?
Any exmples or discussion of how to do this would be greatly appreciated.
Thanks!
Karen Grube
klgrube@yahoo.com
- Next message: Wessam Zeidan: "Re: REPOST: Need help locating a web date control with popup calendar"
- Previous message: ree32: "Finding out which Control was activated"
- Next in thread: Ken Cox [Microsoft MVP]: "RE: How do I update a label with the summary total of six textboxes?"
- Reply: Ken Cox [Microsoft MVP]: "RE: How do I update a label with the summary total of six textboxes?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|