I am picking up data from an html form. The fields
contain numbers. For some incredibly weird reason,
vbscript insists on concatenating the numbers so that 1,
2 and 6 add up to 126 instead of 9. I sure wish I could
use the old val function in VB to force it to do
addition. Below, I am using isnumeric to test for
numbers, rather than blanks in the fields.
if isnumeric(Request.Form("quant2"))then
quantity2=(Request.Form("quant2"))
else quantity2=0
end if
Clearly, isnumeric is not generating any errors, since
the numbers do show up--they just are not added together.
I also first tried:
if (request.form("quant3"))<>"" then
quantity3=(Request.Form("quant3"))
else quantity3=0
end if
I then add up the variables like:
quantot = quantity1 + quantity2 + quantity3
I also tried to use the conversion function for Cint and
Csng, which made no difference.