added #if TARGET_J2EE
authorIgor Zelmanovich <igorz@mono-cvs.ximian.com>
Tue, 8 Jan 2008 08:22:03 +0000 (08:22 -0000)
committerIgor Zelmanovich <igorz@mono-cvs.ximian.com>
Tue, 8 Jan 2008 08:22:03 +0000 (08:22 -0000)
svn path=/trunk/mcs/; revision=92431

mcs/class/System.Web.Extensions/System.Web.Handlers/ScriptModule.cs

index cc2b0c97982846a4402fb764b9c829bcbd2fd678..bf4bad4bfce183594ff96e3cfc37abf1a5a50c2a 100644 (file)
@@ -87,6 +87,10 @@ namespace System.Web.Handlers
                        HttpContext context = app.Context;\r
                        if (context.Request.Headers ["X-MicrosoftAjax"] == "Delta=true") {\r
                                Page p = context.CurrentHandler as Page;\r
+#if TARGET_J2EE\r
+                               if (p == null && context.CurrentHandler is IServiceProvider)\r
+                                       p = (Page) ((IServiceProvider) context.CurrentHandler).GetService (typeof (Page));\r
+#endif\r
                                if (p == null)\r
                                        return;\r
                                ScriptManager sm = ScriptManager.GetCurrent (p);\r