473,732 Members | 2,210 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Assign session onEnd event handler at run-time

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
Nov 18 '05 #1
3 1917
just code a session on end routine in global.asax that implements this
model.

-- bruce (sqlwork.com)
"Pavils Jurjans" <pa****@mailbox .riga.lv> wrote in message
news:Oi******** ******@TK2MSFTN GP10.phx.gbl...
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

Nov 18 '05 #2
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" <pa****@mailbox .riga.lv> wrote in message
news:Oi******** ******@TK2MSFTN GP10.phx.gbl...
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

Nov 18 '05 #3
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 [MVP]" <vapor at steaming post office> wrote in message
news:Ot******** ******@TK2MSFTN GP10.phx.gbl...
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" <pa****@mailbox .riga.lv> wrote in message
news:Oi******** ******@TK2MSFTN GP10.phx.gbl...
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


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
5292
by: Brett Porter | last post by:
Howdy, For a challenge I took on a very large project and have decided to develop it on Red Hat, using PHP and MySQL. I am pleased to say that using Red Hat, PHP and MySQL has been extremely painless and a general pleasure to use. One thing has stumped me though. Part of my site uses a forum/chat-area which highlights which users
3
7214
by: JezB | last post by:
I want to clear some specific Session variables when the user closes a page. On my page I have a "return to ..." button which navigates back to the parent page from which it was invoked - under the click event of this button I clear my Session variables. However, how can I capture the fact that the page has been finished with, to clear my session variables, if the user (a) navigates away from the page directly by entering a URL, (b)...
4
1587
by: VB Programmer | last post by:
In my asp.net app I'm logging whenever someone signs in through the login page successfully. How do I log when they've "gone away", whether by closing the browser, the session vars for a person has expired, etc...? Thanks
3
7384
by: Simon | last post by:
Hi all, Any help with this would be much appreciated: I have a site where the session needs to timeout because of security concerns. I want to send the user back to the login page if the session is expired. Whats happening at the moment is that objects that exisit in the Session are being accessed when the session has expired.
5
2495
by: Raghu Raman | last post by:
HI, am using a simple project in asp.net using c#. if i put the break point in the application start & session start event , they are firing good .BUT WHEN i close my project while running on IE, the session end & application end event are not firing even though i put the break point there. Could u give me the solution for this how i could trace those.
3
2678
by: Phillip N Rounds | last post by:
I'm writing a user control which has two states: Active & InActive. I additionally am required that there to be only one active control per page, and all logic has to be contained within the control. In its inactive state, only a single button appears. If the user clicks on this button, the control becomes active( the rest of the control's functionality becomes visible), and all other instances of this user control on the page should...
11
2105
by: David Thielen | last post by:
Hi; Is there some kind of session ID variable that I can get in the code behind and that is available in Session_OnEnd() to know what session ended? -- thanks - dave david_at_windward_dot_net http://www.windwardreports.com
7
2684
by: Ty | last post by:
Hi, All- I have a custom httphandler that outputs an image to the browser based upon some user input. I'd like to be able to store information about that image in session and have them accessible to all aspx pages in my project. Session state seems to be working normally in my handler, however, the session variables are not accessible anywhere outside the handler itself. Any ideas?
18
3939
by: joaotsetsemoita | last post by:
Hello everyone, I'm having troubles assigning an onclick event to a cell. Im trying something like cursorPoint.cells.style.cursor = "hand"; cursorPoint.cells.width = "20"; cursorPoint.cells.onclick = "alert('this is a test');" cursorPoint.cells.alt = "Select the columns"; cursorPoint.cells.innerHTML = "&nbsp;"
3
1850
by: =?ISO-8859-1?Q?Norbert_P=FCrringer?= | last post by:
Hello, I've got a recursive data model, where the root object gets a certain event handler: DataObject root = new DataObject(); root.DataObjectCreated += new DataObjectEventHandler(OnDataObjectCreated); Now the DataObject has a collection of sub data objects with following
0
8946
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8774
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9447
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9307
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9181
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.