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
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;
}
}