[thelist] if...or...then in asp
Anthony Baratta
Anthony at Baratta.com
Mon Feb 25 13:23:00 CST 2002
At 12:04 AM 2/25/2002, George Klingenhoffer wrote:
>Using ASP, what's the proper way to evaluate this and is does this account
>for most ways that someone could enter a bogus value for 'curpage' in the
>url:
>
><%
>If (Not IsNumeric(Request("curpage"))) Or (Request("curpage") < 1) Then
> CurrentPage = 1
>Else
> CurrentPage = Request("curpage")
>End If
>%>
I would make one minor change:
If (Not IsNumeric(Request("curpage"))) _
Or (CInt(Trim(Request("curpage"))) < 1) Then
----
Anthony Baratta
President
Keyboard Jockeys
"Conformity is the refuge of the unimaginative."
More information about the thelist
mailing list