Hi,
I have a strange problem where CInt (as well as Convert.ToInt32 or even Val) return -1 for a string "500". Using Gurock's SmartInspect for logging, I've checked all values at runtime (SiAuto... logs something, I'm posting the log below the code). Would appreciate some hlp :)
Thanks
Michael
Si.Auto.Main.LogString("QueryString.q1",GetQueryStringParam("q1","0"))
' is it really "500" as it seems?
SiAuto.Main.LogBool("Is q1 = 500 in query-string?","500"=GetQueryStringParam("q1","0"))
q1 = CInt(GetQueryStringParam("q1","0"))
'don't worry abt that q1a-bit, the first string is just the title...
SiAuto.Main.LogInt("q1a",q1)
q1 = Convert.ToInt32(GetQueryStringParam("q1","0"))
SiAuto.Main.LogInt("q1b",q1)
q1 = val(GetQueryStringParam("q1","0"))
SiAuto.Main.LogInt("q1c",q1)
And here's the log:
QueryString.q1 = "500"
Is q1 = 500 in query-string? = True
q1a = -1
q1b = -1
q1c = -1