public IViewTemplate LoadViewTemplate(string viewname, string controller) { string viewfile = FindViewTemplate(viewname, ControllerService.CleanControllerName(controller)); if (viewfile == null) throw new InvalidOperationException(string.Format("Can't find view `{0}` for controller `{1}`", viewname, controller)); // Create the view return LoadViewTemplate(viewfile); }