Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Application Variable in ASP

Explorer ,
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
TOPICS
Server side applications

Views

291
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
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
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 28, 2006 May 28, 2006

Copy link to clipboard

Copied

LATEST
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



Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines