protected void ResetRendering(string id)
        {
            Assert.ArgumentNotNull(id, "id");
            if (!this.IsComponentDisplayed(id))
            {
                return;
            }
            XElement rulesSet = this.RulesSet;
            XElement ruleById = PersonalizationFormWithActions.GetRuleById(rulesSet, id);

            if (ruleById != null)
            {
                PersonalizationFormWithActions.RemoveAction(ruleById, this.SetRenderingActionId);
                this.RulesSet = rulesSet;
                HtmlTextWriter htmlTextWriter = new HtmlTextWriter(new StringWriter());
                this.RenderSetRenderingAction(ruleById, htmlTextWriter);
                SheerResponse.SetInnerHtml(string.Concat(id, "_setrendering"), htmlTextWriter.InnerWriter.ToString().Replace("{ID}", id));
            }
        }
        protected void SwitchRenderingClick(string id)
        {
            Assert.ArgumentNotNull(id, "id");
            XElement rulesSet = this.RulesSet;
            XElement ruleById = PersonalizationFormWithActions.GetRuleById(rulesSet, id);

            if (ruleById != null)
            {
                if (this.IsComponentDisplayed(ruleById))
                {
                    PersonalizationFormWithActions.AddAction(ruleById, this.HideRenderingActionId);
                }
                else
                {
                    PersonalizationFormWithActions.RemoveAction(ruleById, this.HideRenderingActionId);
                }
                this.RulesSet = rulesSet;
            }
        }