private void AddDummyScriptControllerToPage(string pageTitlePrefix, string urlNamePrefix, PageTemplate template, string placeHolder = "Body") { var controls = new List <System.Web.UI.Control>(); var mvcProxy1 = new MvcControllerProxy(); mvcProxy1.ControllerName = typeof(DummyScriptController).FullName; var newsController1 = new DummyScriptController(); mvcProxy1.Settings = new ControllerSettings(newsController1); controls.Add(mvcProxy1); var mvcProxy2 = new MvcControllerProxy(); mvcProxy2.ControllerName = typeof(DummyScriptController).FullName; var newsController2 = new DummyScriptController(); mvcProxy2.Settings = new ControllerSettings(newsController2); controls.Add(mvcProxy2); Guid pageId = FeatherServerOperations.Pages().CreatePageWithTemplate( template, pageTitlePrefix, urlNamePrefix); PageContentGenerator.AddControlsToPage(pageId, controls, placeHolder); }
private void AddScriptControllerToPage(Guid pageId, string scriptSource = null, string sectionName = null) { var mvcProxy = new MvcControllerProxy(); mvcProxy.ControllerName = typeof(DummyScriptController).FullName; var controller = new DummyScriptController(); controller.ScriptSource = scriptSource; controller.SectionName = sectionName; mvcProxy.Settings = new ControllerSettings(controller); PageContentGenerator.AddControlToPage(pageId, mvcProxy, Guid.NewGuid().ToString("N"), "TestPlaceHolder"); }