2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Fri, 19 Mar 2004 21:53:04 +0000 (21:53 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Fri, 19 Mar 2004 21:53:04 +0000 (21:53 -0000)
* Page.cs: return HttpContext.Current if _context has not yet been
assigned to. Fixes bug #55245.

svn path=/trunk/mcs/; revision=24352

mcs/class/System.Web/System.Web.UI/ChangeLog
mcs/class/System.Web/System.Web.UI/Page.cs

index 7f834cda45a8a4aecc0b120c5d27b411f89c6b26..6ee71b4127ce4d95fbabf8352882f12188cae82f 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Page.cs: return HttpContext.Current if _context has not yet been
+       assigned to. Fixes bug #55245.
+
 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * TemplateParser.cs: don't add import statement or assemblies from
index 1adb4a738389e5555a5eb48deac66918b29c64d4..b8f05523a58814eea724b0cfa483e0db638e3df2 100755 (executable)
@@ -126,7 +126,12 @@ public class Page : TemplateControl, IHttpHandler
 
        protected override HttpContext Context
        {
-               get { return _context; }
+               get {
+                       if (_context == null)
+                               return HttpContext.Current;
+
+                       return _context;
+               }
        }
 
        [EditorBrowsable (EditorBrowsableState.Never)]