get int parameter
843841Mar 20 2005 — edited Mar 20 2005hi..i need some help here..
i use this code
keyID2 = request.getParameter("keyID2")
keyID3 = request.getParameter("keyID3")
and assign the value to String keyID2 and keyID3. The value i received from keyID2 and keyID3 is both an integer value, but using the syntax request.getParameter("keyID2") i can only assign the value received to a string variable.
The problem is i need to add up both the value of string keyID2 and keyID3 and assign it to an integer variable, but it seems if i just do the normal keyID2+keyID3, the normal integer addition doesn't occur here; instead it just concantenates both the now string value.
how do i overcome this problem?
any help are greatly appreciated. thanks in advance