lleemon
May 19th, 2004, 07:13 AM
Using asp.net (vb) and have a label and textbox.
In vb6 we could do a lblExciseAmt.Text + txtLaborAmt.Text and result in the sum of the two numbers provided in each control.
If I have a value of 1 and 0 respectively I get a result of 10 in asp.net. Is there a new way of doing calculations? Do I have to put into variables first?
Well I got the first issue resolved by adding the CDbl. Now I get an the following error 'Input string was not in a correct format' pointing to the 2nd line.
lblMLSubTotal.Text = CDbl(txtMaterialAmt.Text) + CDbl(txtLaborAmt.Text)
lblExciseAmt.Text = CDbl(lblMLSubTotal.Text) * CDbl(txtExciseAmt.Text)
Thanks in advance.
In vb6 we could do a lblExciseAmt.Text + txtLaborAmt.Text and result in the sum of the two numbers provided in each control.
If I have a value of 1 and 0 respectively I get a result of 10 in asp.net. Is there a new way of doing calculations? Do I have to put into variables first?
Well I got the first issue resolved by adding the CDbl. Now I get an the following error 'Input string was not in a correct format' pointing to the 2nd line.
lblMLSubTotal.Text = CDbl(txtMaterialAmt.Text) + CDbl(txtLaborAmt.Text)
lblExciseAmt.Text = CDbl(lblMLSubTotal.Text) * CDbl(txtExciseAmt.Text)
Thanks in advance.