[thelist] why doesn't this work? (ASP 2.0)
Ken Schaefer
ken at adOpenStatic.com
Sat Jan 3 00:48:58 CST 2004
Why don't you use CLng() and explicitly cast the variant rather than doing
an implicit conversion?
<%
lngVersion = Request.QueryString("version")
lngCounter = 12
If isNumeric(lngVersion) then
lngVersion = CLng(lngVersion)
Else
lngVersion = 0
End If
If lngCounter = lngVersion then
' ...
End If
%>
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Lonnie" <kr43m0r at earthlink.net>
Subject: Re: [thelist] why doesn't this work? (ASP 2.0)
: > given calculated or retrieved values
: > counter = 12
: > request.querystring("Version") = 12
: >
: > I've tried these but none seem to pass the test
: >
: > if request.querystring("Version") = counter then
: > if trim(request.querystring("Version")) = trim(counter) then
: > if request.querystring("Version") = trim(counter) then
: > if trim(request.querystring("Version")) = counter then
: > if cint(trim(request.querystring("Version"))) = cint(trim(counter))
: > then if trim(cint(request.querystring("Version"))) =
: > trim(cint(counter)) then
:
: Very useful:
: if request.querystring("Version")*1 = counter then
:
: ...the *1 converts to numeric.
:
: --
: * * Please support the community that supports you. * *
: http://evolt.org/help_support_evolt/
:
: For unsubscribe and other options, including the Tip Harvester
: and archives of thelist go to: http://lists.evolt.org
: Workers of the Web, evolt !
:
More information about the thelist
mailing list