[thelist] ASP: variable in a comparison

Joel Morris joelm at citycent.com
Thu Sep 7 23:40:21 CDT 2000


This should work:

if Request.Form("navigation") = VariableName Then

Joel
----------------------------
CityCenter Co.
Web Development & Marketing
mailto:joelm at citycent.com
http://www.citycent.com



> -----Original Message-----
> From: thelist-admin at lists.evolt.org
> [mailto:thelist-admin at lists.evolt.org]On Behalf Of McCreath_David
> Sent: Thursday, September 07, 2000 8:53 PM
> To: 'thelist at lists.evolt.org'
> Subject: [thelist] ASP: variable in a comparison
>
>
> Ooooh...I hope somebody's awake...
>
> Here's the short question:
>
> How do I call a declared variable in this statement?
>
>   if Request.Form("navigation")="'call variable here'" then
>   Response.Redirect("step'call variable here'.asp")
>
> I tried this:
>
>   if Request.Form("navigation")="& VariableName &" then
>
> and that's not working. (I have the Response.Redirect hardcoded
> right now.)
>
> Longish explanation:
>
> I'm building a little nav tool for a multipage form where each page is a
> prerequisite for the next. So on the very first page, I set a key on a
> session cookie called "CurrentStep" with a value of "1" and
> insert that into
> a column on a table in the database. Then on every page following, I check
> that cookie and compare it to a number on the page. (This is just to keep
> people from jumping ahead.)
>
> If "CurrentStep" is less than or equal to the number on the page,
> then I set
> it as a variable, and set two more variables based on it:
>
>   NextStep=Request.Cookies("CurrentStep")+1
>   PreviousStep=Request.Cookies("CurrentStep")-1
>
> The way this plays into the nav tool is that when I build the
> select for the
> nav tool, I use those three variables as the values for "Save current data
> and 1)Proceed, 2)Repeat [some pages can have multiple entries],
> 3) Go Back,
> or 4) Log Out.
>
> The pages are called "stepX.asp".
>
> 'Zat all make sense?
>
> Dave workin' late
> np:cablemusic.com -- Trance
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !





More information about the thelist mailing list