Home >Documents >ASP Tutorial 4 Slides

ASP Tutorial 4 Slides

Date post:10-Apr-2018
Category:
View:219 times
Download:0 times
Share this document with a friend
Transcript:
  • 8/8/2019 ASP Tutorial 4 Slides

    1/21

  • 8/8/2019 ASP Tutorial 4 Slides

    2/21

    IIS 3

  • 8/8/2019 ASP Tutorial 4 Slides

    3/21

    IIS 3

  • 8/8/2019 ASP Tutorial 4 Slides

    4/21

    IIS 4

  • 8/8/2019 ASP Tutorial 4 Slides

    5/21

    IIS 4

  • 8/8/2019 ASP Tutorial 4 Slides

    6/21

    IIS 5

  • 8/8/2019 ASP Tutorial 4 Slides

    7/21

    IIS 5

  • 8/8/2019 ASP Tutorial 4 Slides

    8/21

    Global.asa

    Sub Application_OnEnd()

    End Sub

    Sub Application_OnStart()

    Application("NumSession") = 0

    Application("NumVisited") = 0

    Session.Timeout = 10

    End Sub

    Sub Session_OnEnd()

    Application("NumSession") = Application("NumSession") 1

    End Sub

    Sub Session_OnStart()

    Application("NumSession") = Application("NumSession") + 1

    Application("NumVisited") = Application("NumVisited") + 1

    End Sub

  • 8/8/2019 ASP Tutorial 4 Slides

    9/21

    Is virtual directory is an application

    Remove button willappear if your virtual

    directory is an

    application

  • 8/8/2019 ASP Tutorial 4 Slides

    10/21

  • 8/8/2019 ASP Tutorial 4 Slides

    11/21

    Application Object: appVarTest.asp

    Application Variable Test

    Values of the Application Variables:

    myAppVariable =

    anotherAppVariable =

    Setting the Application Variables:

    Variable set - click here to reload the page.

  • 8/8/2019 ASP Tutorial 4 Slides

    12/21

    Session Object: sessVarTest.asp

    Session Variable Test

    Writing current access time to the session object

    Click here to refresh the page.

    Click here to abandon the session.

  • 8/8/2019 ASP Tutorial 4 Slides

    13/21

    Session Object: abandon.asp

    S Gl b l

  • 8/8/2019 ASP Tutorial 4 Slides

    14/21

    Summary: Global.asa

    Sub Application_OnStart

    Application("visits") = 0Application("Active") = 0

    End Sub

    Sub Application_OnEnd

    End Sub

    S Gl b l ( t )

  • 8/8/2019 ASP Tutorial 4 Slides

    15/21

    Summary: Global.asa (cont.)

    Sub Session_OnStart

    Session.Timeout = 1

    Session("Start") = Now

    Application.Lock

    Application("visits") = Application("visits") + 1intTotal_visitors = Application("visits")

    Application.UnLock

    Session("VisitorID") = intTotal_visitors

    Application.Lock

    Application("Active") = Application("Active") + 1

    Application.UnLock

    End Sub

    Sub Session_OnEnd

    Application.Lock

    Application("Active") = Application("Active") - 1

    Application.UnLock

    End Sub

    S Vi it C t

  • 8/8/2019 ASP Tutorial 4 Slides

    16/21

    Summary: VisitorCount.asp

    Retrieving Variables Set in Global.asa

    There have been total visits to this site.

    You are one of active visitors.

    Your Session started at:

    C ki L i

  • 8/8/2019 ASP Tutorial 4 Slides

    17/21

    Cookies: Login.asp

    Cookie Test - Login

    Please Enter your emailadress and password to login to the system.

    Email Address:

    Password:

    Save Login as a Cookie?

    &nbsp &nbsp

    Cookies: CheckLogin asp

  • 8/8/2019 ASP Tutorial 4 Slides

    18/21

    Cookies: CheckLogin.asp

    Cookie Test - Check Login

    Thank you for logging into the system.

    Email address confirmation:

    Cookies: Login2 asp

  • 8/8/2019 ASP Tutorial 4 Slides

    19/21

    Cookies: Login2.asp

    Cookie Test - Login

    Please Enter your emailadress and password to login to the system.

    Email Address:

    Password:

    Save Login as a Cookie?

    &nbsp &nbsp

    Cookies: CheckLogin2 asp

  • 8/8/2019 ASP Tutorial 4 Slides

    20/21

    Cookies: CheckLogin2.asp

    Cookies: CheckLogin2 asp (cont )

  • 8/8/2019 ASP Tutorial 4 Slides

    21/21

    Cookies: CheckLogin2.asp (cont.)

    Cookie Test - Check Login

    Thank you for logging into the system.

    Email address confirmation:

of 21/21
Application Handling with ASP & IIS March 15, 2002
Embed Size (px)
Recommended