tags:

views:

28

answers:

2
IF Session("days")> 1 then

this statement is not working in my Classic ASP code.Any help is greatly appreciated

Just I need to know whether this is a valid session code for Classic ASP (No error message is showing)

+4  A: 

Most probably this is because Session("days") returns a string that you are using as integer.

This might fix the issue

If CINT(Session("days"))>1 Then
End If
Naveen Bhalla
Better yet make sure that at the point the Session variable is assigned it is of the correct type, then you won't have to worry about every where you use it.
AnthonyWJones
A: 

when saving the session variable do session("var") = 1 not: session("var") = "1"

or:

 Dim svar as Integer
 svar = some integer
 session("var") = svar
Noam Smadja