0

After Response.Redirect("~/somedir/somepage.aspx") What are the events which are fired at page level,session level and application level?

As far as I know there is one event Application_EndRequest which is fired at the end and this event's handler one can provide.

I want to achieve is that if application have numerous response.redirects through out the application I want to have a single event handler where I can keep list of all the response.redirects happened in a given session.

In Application_EndRequest Session object is Nothing so if try to save it in Session it will not work.

I feel there will be a event in the pipeline where session is also available and location to be redirected is also available(which one can retrieve by context.headers["location"]).

Kindly advice.

Alex
  • 15
  • 5
  • if the page is on the same site which i assume is only page level events will be fired. no application, session level event will be fired. – The Shooter Jul 27 '16 at 04:57
  • What I have seen and found in few blogs that after reponse.redirect Application_EndRequest do fires, reason is that HttpApplicationHandler events are supposed to be fired not sure which all have public event handlers available – Alex Jul 28 '16 at 05:55
  • You are right. You might like to check this link https://msdn.microsoft.com/en-us/library/ms178473.aspx. Gives a detailed insight into asp.net Application. – The Shooter Jul 28 '16 at 06:03

0 Answers0