Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Regular Coder
    Join Date
    Dec 2004
    Location
    Jamaica
    Posts
    592
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Cool Include files without global.asa

    Can i use the include command if the server i am using does not support the global.asa file?

  • #2
    Regular Coder
    Join Date
    Jul 2004
    Location
    France
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yes of course
    but asp without session is like a girl without permission access

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts
    but the fact that global.asa cannot be used is not directly followed by the fact that Session cannot be used.

    <note to="self">remember gwendaals "is like .." example</note>
    I am the luckiest man in the world

  • #4
    Regular Coder
    Join Date
    Jul 2004
    Location
    France
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you can of course use session and application in your applications without any global.asax or asa ... I nearlly never use this kind of files

  • #5
    Regular Coder
    Join Date
    Dec 2004
    Location
    Jamaica
    Posts
    592
    Thanks
    2
    Thanked 0 Times in 0 Posts
    So are you saying that I can use like the Session Abandon function and can create session variables without the global.asa file? Thing is, I think i was reading on w3schools

    Thus far I've been able to use the session ID but I didn't think that that meant I could use the other session functions...

    The fact that I can use the session id, does that indicate that I can use the other session functions?

    I know gwendaal, please don't rub it in...


    My server's position:
    Global.asa is not supported due to our system setup.


    http://www.w3schools.com/asp/asp_globalasa.asp
    The Global.asa file can contain only the following:

    Application events
    Session events
    <object> declarations
    TypeLibrary declarations
    the #include directive

    Thing is, I would use session variables in my code but I have to be sure that I can use the session_on end function to delete all those variables

  • #6
    Regular Coder
    Join Date
    Jul 2004
    Location
    France
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts
    don't worry when session end the variables are killed

    juste try in a test page

    <%
    Session("test") = 10

    Response.Write(Session("test"))
    %>

    and you will see

  • #7
    Senior Coder
    Join Date
    Apr 2003
    Location
    England
    Posts
    1,192
    Thanks
    5
    Thanked 13 Times in 13 Posts
    wasnt the question about includes? i think you can still use <!--#include file="..."-->
    but if not just use Server.Execute("...")

    hope this helps

  • #8
    Regular Coder
    Join Date
    Dec 2004
    Location
    Jamaica
    Posts
    592
    Thanks
    2
    Thanked 0 Times in 0 Posts
    I'm not worried about removing the session variables, I want to do a database operation when the session ends......

    I tried your lil example.... thanks alot man.... but can I how do I find out if I can use the session_on end function to do a database operation?

    And on which page would I use the session on end function if I can use it?

    Thing is, I write in my database some user variables when the user enters the site... when the user leaves the site I want to delete those variables from the database.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •