Page redirection
-
Is there a page event called when we use response.redirect to redirect to any other page? The reason is that i want to perform some actions just before the page is redirected. Thx in advance
Bye
-
Is there a page event called when we use response.redirect to redirect to any other page? The reason is that i want to perform some actions just before the page is redirected. Thx in advance
Bye
I am a bit apprehensive whether it will work or not.. Try it once..I wrote a code for a similar requirement and its working .... u can call some events.. u will have create a different class public void Init(HttpApplication context) { (IsDisposed) { throw (new ObjectDisposedException(this.ToString())); } else { context.BeginRequest +=new EventHandler(context_BeginRequest); context.EndRequest += new EventHandler(context_EndRequest); } } //This function will get called before ending exection of any page. private void context_EndRequest(object sender, EventArgs e) { if (((HttpApplication)sender).Context.CurrentHandler.ToString() != "UR_PAGE_NAME") { //Ur Code } }
-
I am a bit apprehensive whether it will work or not.. Try it once..I wrote a code for a similar requirement and its working .... u can call some events.. u will have create a different class public void Init(HttpApplication context) { (IsDisposed) { throw (new ObjectDisposedException(this.ToString())); } else { context.BeginRequest +=new EventHandler(context_BeginRequest); context.EndRequest += new EventHandler(context_EndRequest); } } //This function will get called before ending exection of any page. private void context_EndRequest(object sender, EventArgs e) { if (((HttpApplication)sender).Context.CurrentHandler.ToString() != "UR_PAGE_NAME") { //Ur Code } }
Prateek G wrote:
public void Init(HttpApplication context) { (IsDisposed) { throw (new ObjectDisposedException(this.ToString())); }
What is this IsDisposed, im getting error on it in vb.net. Also tell me who will set the value of the context and can I integrate it directly to the Page_Init event.
Bye
-
Prateek G wrote:
public void Init(HttpApplication context) { (IsDisposed) { throw (new ObjectDisposedException(this.ToString())); }
What is this IsDisposed, im getting error on it in vb.net. Also tell me who will set the value of the context and can I integrate it directly to the Page_Init event.
Bye