- {\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);