Rock.Web.UI.Controls.RockRadioButtonList.RenderControl C# (CSharp) Method

RenderControl() public method

Outputs server control content to a provided T:System.Web.UI.HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
public RenderControl ( System.Web.UI.HtmlTextWriter writer ) : void
writer System.Web.UI.HtmlTextWriter The object that receives the control content.
return void
        public override void RenderControl( HtmlTextWriter writer )
        {
            if ( this.Visible )
            {
                RockControlHelper.RenderControl( this, writer );
            }
        }

Usage Example

Exemplo n.º 1
0
        /// <summary>
        /// This is where you implement the simple aspects of rendering your control.  The rest
        /// will be handled by calling RenderControlHelper's RenderControl() method.
        /// </summary>
        /// <param name="writer">The writer.</param>
        public override void RenderBaseControl(HtmlTextWriter writer)
        {
            base.RenderBaseControl(writer);

            // don't show the PageRoutePicker if this control is not enabled (readonly)
            if (this.Enabled)
            {
                // this might be a PagePicker where we don't want them to choose a PageRoute (for example, the PageRoute detail block)
                if (PromptForPageRoute)
                {
                    _hfPageRouteId.RenderControl(writer);

                    _btnShowPageRoutePicker.RenderControl(writer);

                    writer.Write(string.Format(@"<div id='page-route-picker_{0}' class='picker'>", this.ClientID));
                    writer.Write(@"<div class='picker-menu picker dropdown-menu js-page-route-picker-menu'>");

                    _rblSelectPageRoute.RenderControl(writer);

                    writer.Write(@"<div class='picker-actions'>");

                    _btnSelectPageRoute.RenderControl(writer);
                    writer.WriteLine();
                    _btnCancelPageRoute.RenderControl(writer);
                    writer.Write("</div>");
                    writer.Write(@"</div>");
                    writer.Write(@"</div>");

                    RegisterPageRoutePickerJavaScript();
                }
            }
        }
All Usage Examples Of Rock.Web.UI.Controls.RockRadioButtonList::RenderControl