2010-06-05 Marek Habersack <mhabersack@novell.com>
[mono.git] / mcs / class / System.Web / System.Web.Compilation / ThemeDirectoryCompiler.jvm.cs
index 73844ba3c0ed9fa2b985fb2c8e23eb23e9a519f1..097bc82030fec7de41fc316a32d9d5ca8c394af4 100644 (file)
@@ -35,7 +35,7 @@ using System.Collections;
 using System.IO;
 using System.Web;
 using System.Web.Compilation;
-using System.Web.Util;\r
+using System.Web.Util;
 using System.Web.J2EE;
 
 namespace System.Web.UI
@@ -43,13 +43,14 @@ namespace System.Web.UI
        internal sealed class ThemeDirectoryCompiler
        {
                public static PageTheme GetCompiledInstance (string virtualPath, HttpContext context)
-               {\r
-                       string resolvedUrl = System.Web.Util.UrlUtils.ResolveVirtualPathFromAppAbsolute (virtualPath).TrimEnd('/');\r
-                       Type tmpType = PageMapper.GetObjectType (resolvedUrl);\r
-            if (tmpType == null)\r
-                throw new InvalidOperationException("ThemeDirectoryCompiler '" + virtualPath + "' not found");\r
-\r
-            Object obj = Activator.CreateInstance(tmpType);\r
+               {
+                       virtualPath = "~/App_Themes/" + virtualPath + "/";
+                       string resolvedUrl = System.Web.Util.UrlUtils.ResolveVirtualPathFromAppAbsolute (virtualPath).TrimEnd('/');
+                       Type tmpType = PageMapper.GetObjectType (context, resolvedUrl);
+            if (tmpType == null)
+                throw new InvalidOperationException("ThemeDirectoryCompiler '" + virtualPath + "' not found");
+
+            Object obj = Activator.CreateInstance(tmpType);
             return (PageTheme)obj;
                }
        }