Session_OnStart event occurs when the server creates a new session. The server processess this script prior to executing the requested page. This event is a place for you to set any session-wide variables, because they will be set before any pages are accesses.
All the built in objects like, Application, ObjectContext, Request, Response, Server and Session are available and can be referenced within the Session_OnStart event script.
Example:
Sub Session_OnStart
openingPage = "/unprotected/default.asp"
accessedPage = Request.ServerVariables("Script_name")
if strcomp(accessedPage, openingPage,1) then
Response.Redirect(openingPage)
end if
End Sub
Note: This example will work on browsers which supports cookies.
Best Regards
Vadivel
MVP ASP/ASP.NET
http://vadivel.thinkingms.com