Assign session onEnd event handler at run-time

P

Pavils Jurjans

Hello,

I am looking for solution to assign the Session.onEnd event handler
dynamically, at runtime, without using global.asax file. I am a bit sceptic
wether that is possible, however I thought maybe it is possible to have a
global.asax file with Session_onEnd method, that merely calls some delegate,
and that delegate is assigned by my web application at runtime.

Maybe there is some example ready?

Thanks,

Pavils
 
A

Alvin Bruney [MVP]

why? the purpose of the event in the global file is that it can be called
application wide. Your intention is to re-invent the wheel. Do you have a
good reason for this?
 
B

bruce barker

just code a session on end routine in global.asax that implements this
model.

-- bruce (sqlwork.com)
 
P

Pavils Jurjans

The reason is that in my application, depending on what user was doing
during the session lifetime, different session end handling rountines could
be selected. An the other reason is, I am developing a framework where all
the code is abstracted away in DLLs, and the pages use just codebehind. I
don't want to touch global.asax afterwards anymore, just handle it's events
via code in DLLs. It's not reinventing the wheel. In fact, it's just pure
fully-code-driven application approach - dealing only with DLLs and leaving
alone all these aspx and asax files. That allows to extend application at
runtime without need to create new aspx/asax files.

-- Pavils

Alvin Bruney said:
why? the purpose of the event in the global file is that it can be called
application wide. Your intention is to re-invent the wheel. Do you have a
good reason for this?

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/27cok
Pavils Jurjans said:
Hello,

I am looking for solution to assign the Session.onEnd event handler
dynamically, at runtime, without using global.asax file. I am a bit
sceptic
wether that is possible, however I thought maybe it is possible to have a
global.asax file with Session_onEnd method, that merely calls some
delegate,
and that delegate is assigned by my web application at runtime.

Maybe there is some example ready?

Thanks,

Pavils
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top