If you only need it on one page, I'd use the local variable scope called
"variables" (you can omit the prefix).

Hal Helms
== See www.ColdFusionTraining.com <http://www.ColdFusionTraining.com>  for
info on "Best Practices with ColdFusion & Fusebox" training, Jan 22-25 ==


-----Original Message-----
From: Todd Ashworth [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 06, 2000 11:29 AM
To: CF-Talk
Subject: Which schope? (Was: Re: Application.cfm)


Just out of curiosity .. If you just need to set a variable for one page and
that variable only ever lives on that one page, which would be the better
scope, Variables, or Request, or does it matter?

Todd Ashworth

----- Original Message -----
From: "paul smith" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, December 06, 2000 9:59 AM
Subject: RE: Application.cfm


| Right!  Your application.cfm should have the following for each
| Request-scoped variable:
|
| <CFSET Request.MyVar1 = "foo">
| <CFSET Request.MyVar2 = "bar">
| etc
|
| That way your Request-scoped variables will contain a value and will be
| available to each page.
|
| If the value of your variable changes from page to page, then you really
| shouldn't put it in Request scope.
|
| best,  paul
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to