I have a simple ASP script I am trying to run. Forgive me if this is a real newbie question but I did some searches first and checked an ASP reference and it seems like I am doing everything right - but apparently not.
Heres the scenario:
A = 1 B = 2
Total = A + B
When it outputs the total, it outputs 12 rather than 3.
asp can use either jscript or vbscript. The ampersand is the concatenation operator for vbscript, the plus symbol is the concatenation operator for jscript. It sounds like you are inadvertently executing jscript with your asp rather than vbscript.
shmekkyl, any time you set a variable equal to request("anything"), you're defining it as a string. The '+' operator adds two variables together and adding two strings together is concatenation. Did you try txbakers suggestion to use cInt()? That oughta do it..
Yeah - that was one of the trickiest things to get used to - that ALL web form data are strings. Even the numbers and dates. Once they get put into the request object, you need to manipulate them to make them the type you need.