0
Application Variable in ASP
Explorer
,
/t5/dreamweaver-discussions/application-variable-in-asp/td-p/790535
May 28, 2006
May 28, 2006
Copy link to clipboard
Copied
Afternoon all, Would be grateful if you could confirm, or
correct below - I know how to set a session variable in ASP, in the
example below i'm trying to set EMPLOYERID to the value of 2
<%Session("EMPLOYERID") = "2"%>
This works fine - for twenty minutes then the session dies and all hell breaks lose, with this in mind, i believe that i need to use a Application Variable instead and therefore was wondering whether the below is the correct way of setting an application variable -
<%Application("Employer") = "2"%>
Thanks for your help
<%Session("EMPLOYERID") = "2"%>
This works fine - for twenty minutes then the session dies and all hell breaks lose, with this in mind, i believe that i need to use a Application Variable instead and therefore was wondering whether the below is the correct way of setting an application variable -
<%Application("Employer") = "2"%>
Thanks for your help
TOPICS
Server side applications
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/application-variable-in-asp/m-p/790536#M188622
May 28, 2006
May 28, 2006
Copy link to clipboard
Copied
Or you can change the timeout value of your session by adding
Session.Timeout = 60
to your code. Session value is in minutes so the above sets it to an hour.
.. and so on ..
--
Nancy Gill
Adobe Community Expert
BLOG: http://www.dmxwishes.com/blog.asp
Author: Dreamweaver 8 e-book for the DMX Zone
Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A Beginner's
Guide, Mastering Macromedia Contribute
Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web Development
"GTN1707" <webforumsuser@macromedia.com> wrote in message
news:e5cbpt$a3$1@forums.macromedia.com...
> Afternoon all, Would be grateful if you could confirm, or correct below -
> I
> know how to set a session variable in ASP, in the example below i'm trying
> to
> set EMPLOYERID to the value of 2
>
> <%Session("EMPLOYERID") = "2"%>
>
> This works fine - for twenty minutes then the session dies and all hell
> breaks
> lose, with this in mind, i believe that i need to use a Application
> Variable
> instead and therefore was wondering whether the below is the correct way
> of
> setting an application variable -
>
> <%Application("Employer") = "2"%>
>
> Thanks for your help
>
Session.Timeout = 60
to your code. Session value is in minutes so the above sets it to an hour.
.. and so on ..
--
Nancy Gill
Adobe Community Expert
BLOG: http://www.dmxwishes.com/blog.asp
Author: Dreamweaver 8 e-book for the DMX Zone
Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A Beginner's
Guide, Mastering Macromedia Contribute
Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web Development
"GTN1707" <webforumsuser@macromedia.com> wrote in message
news:e5cbpt$a3$1@forums.macromedia.com...
> Afternoon all, Would be grateful if you could confirm, or correct below -
> I
> know how to set a session variable in ASP, in the example below i'm trying
> to
> set EMPLOYERID to the value of 2
>
> <%Session("EMPLOYERID") = "2"%>
>
> This works fine - for twenty minutes then the session dies and all hell
> breaks
> lose, with this in mind, i believe that i need to use a Application
> Variable
> instead and therefore was wondering whether the below is the correct way
> of
> setting an application variable -
>
> <%Application("Employer") = "2"%>
>
> Thanks for your help
>
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
LATEST
/t5/dreamweaver-discussions/application-variable-in-asp/m-p/790537#M188623
May 28, 2006
May 28, 2006
Copy link to clipboard
Copied
If the session dies, you should redirect the user
accordingly. eg
if Session("EmployerID")="" then Response.Redirect "login.asp"
You can't really use application variables, as they are the same for
everybody not individual users.
--
Jules
http://www.charon.co.uk/charoncart
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004
if Session("EmployerID")="" then Response.Redirect "login.asp"
You can't really use application variables, as they are the same for
everybody not individual users.
--
Jules
http://www.charon.co.uk/charoncart
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

