public override void Insert() { SiteContext siteContext = Context.Site; if (((siteContext != null) && (siteContext.EnableWebEdit && (siteContext.DisplayMode == DisplayMode.Edit))) && (WebUtil.GetQueryString("sc_webedit") != "0")) { UserControlRenderer editControl = new UserControlRenderer { Src = "/sitecore/shell/Applications/Taxonomy/Controls/PageEditor/TaxomomiesRendering.ascx" }; RenderingReference menuRenderingReference = new RenderingReference(editControl) { Placeholder = "webedit", AddToFormIfUnused = true }; Context.Page.AddRendering(menuRenderingReference); } }
public void SaveAll(List <Event> events) { var uc = ((EventsViewer)UserControlRenderer.LoadControl("/Examples/Calendar/Overview/Shared/Common/EventsViewer.ascx")); uc.Render(events); }
public string SaveAll(List <EventModel> events) { EventsViewer uc = ((EventsViewer)UserControlRenderer.LoadControl("/Examples/Calendar/Overview/Shared/Common/EventsViewer.ascx")); return(uc.ToScript(events)); }