Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ Application Language="C#" %>
- <script runat="server">
- void Session_Start(object sender, EventArgs e)
- {
- }
- </script>
- public void Init(HttpApplication context)
- {
- context.BeginRequest += new EventHandler(Begin_Request);
- IHttpModule sessionModule = context.Modules["Session"];
- if(sessionModule != null &&
- sessionModule.GetType() == typeof(System.Web.SessionState.SessionStateModule))
- {
- (sessionModule as System.Web.SessionState.SessionStateModule).Start
- += new EventHandler(CustomHttpModule_Start);
- }
- }
- <%@ Application Language="C#" CodeBehind="Global.asax.cs" Inherits="Global" %>
- public class Global : System.Web.HttpApplication
- {
- public Global() { }
- void Session_Start(object sender, EventArgs e)
- {
- // Code that runs when a new session is started
- }
- }
Add Comment
Please, Sign In to add comment