Beispiel #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 void RenderBaseControl(HtmlTextWriter writer)
        {
            foreach (NumberUpDown numberUpDown in NumberUpDownControls)
            {
                writer.AddAttribute(HtmlTextWriterAttribute.Class, "margin-l-sm margin-b-sm");
                writer.RenderBeginTag(HtmlTextWriterTag.Div);

                // control label
                writer.AddAttribute(HtmlTextWriterAttribute.Class, "margin-b-sm");
                writer.RenderBeginTag(HtmlTextWriterTag.Div);
                writer.Write(numberUpDown.Label);
                writer.RenderEndTag();

                // control
                numberUpDown.RenderBaseControl(writer);

                writer.RenderEndTag();
            }

            GroupCustomValidator.RenderControl(writer);
        }
Beispiel #2
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 void RenderBaseControl(HtmlTextWriter writer)
        {
            foreach (var control in ControlGroup)
            {
                writer.AddAttribute(HtmlTextWriterAttribute.Class, "margin-l-sm margin-b-sm");
                writer.RenderBeginTag(HtmlTextWriterTag.Div);

                // control label
                writer.AddAttribute(HtmlTextWriterAttribute.Class, "margin-b-sm");
                writer.RenderBeginTag(HtmlTextWriterTag.Div);
                writer.Write(control.Label);
                writer.RenderEndTag();

                // control
                control.RenderBaseControl(writer);

                writer.RenderEndTag();
            }

            GroupCustomValidator.RenderControl(writer);
        }