/// <summary> /// Renders the control page design mode. /// /// </summary> /// <param name="output">The output.</param><param name="isDesignAllowed">if set to <c>true</c> [is design allowed].</param><param name="control">The control.</param> private void RenderControlPageDesignMode(HtmlTextWriter output, bool isDesignAllowed, Control control) { Assert.ArgumentNotNull((object)output, "output"); Assert.ArgumentNotNull((object)control, "control"); RenderingReference renderingReference = Client.Page.GetRenderingReference(control); bool flag = false; if (renderingReference != null) { string uniqueId = renderingReference.UniqueId; if (Sitecore.Data.ID.IsID(uniqueId)) { string controlId = ShortID.Encode(uniqueId); Item obj = this.GetItem(); Assert.IsNotNull((object)obj, "item"); ChromeData controlData = Placeholder72.GetControlData(renderingReference, obj); output.Write(Placeholder72.GetControlStartMarker(controlId, controlData, isDesignAllowed)); control.RenderControl(output); output.Write(Placeholder72.GetControlEndMarker(controlData)); flag = true; } } if (flag) { return; } control.RenderControl(output); }
/// <summary> /// Renders the control start marker. /// /// </summary> /// <param name="controlId">The control id.</param><param name="data">The data.</param> /// <returns> /// The control start marker. /// </returns> public static string GetControlStartMarker(string controlId, ChromeData data) { Assert.ArgumentNotNull((object)controlId, "controlId"); Assert.ArgumentNotNull((object)data, "data"); return(Placeholder72.GetControlStartMarker(controlId, data, true)); }