Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/Support
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv24049
Modified Files:
PageHandlerFactory.cs
Log Message:
fixed SPRNET-931
Index: PageHandlerFactory.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/Support/PageHandlerFactory.cs,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** PageHandlerFactory.cs 5 Apr 2008 14:52:44 -0000 1.39
--- PageHandlerFactory.cs 23 Apr 2008 15:42:46 -0000 1.40
***************
*** 171,175 ****
#if NET_2_0
private static readonly FieldInfo fiHttpContext_CurrentHandler =
! typeof (HttpContext).GetField("_currentHandler", BindingFlags.NonPublic | BindingFlags.Instance);
#endif
--- 171,177 ----
#if NET_2_0
private static readonly FieldInfo fiHttpContext_CurrentHandler =
! typeof(HttpContext).GetField("_currentHandler", BindingFlags.NonPublic | BindingFlags.Instance);
! private static readonly MethodInfo miPage_SetPreviousPage =
! typeof(System.Web.UI.Page).GetMethod("SetPreviousPage", BindingFlags.NonPublic | BindingFlags.Instance);
#endif
***************
*** 272,275 ****
--- 274,288 ----
fiHttpContext_CurrentHandler.SetValue(context, handler);
}
+
+ if (handler is System.Web.UI.Page)
+ {
+ System.Web.UI.Page page = (Page) handler;
+
+ // During Server.Transfer/Execute() the PreviousPage property gets set
+ if (this.PreviousPage != null)
+ {
+ miPage_SetPreviousPage.Invoke(page, new object[] { this.PreviousPage });
+ }
+ }
#endif
|