//--- This class allows us to render the design time mode with custom HTML ---'
		public override string GetDesignTimeHtml()
		{
			// Component is the instance of the component or control that
			// this designer object is associated with. This property is 
			// inherited from System.ComponentModel.ComponentDesigner.
			DNNMenu objMenu = (DNNMenu)Component;

			if (objMenu.ID.Length > 0)
			{
				StringWriter sw = new StringWriter();
				HtmlTextWriter tw = new HtmlTextWriter(sw);
				Label objText = new Label();

				objText.CssClass = objMenu.MenuBarCssClass + " " + objMenu.DefaultNodeCssClass;
				objText.Text = objMenu.ID;

				if (objMenu.Orientation == Orientation.Horizontal)
				{
					objText.Width = new Unit("100%");
				}
				//objText.Height = New Unit(objMenu)
				else
				{
					objText.Height = new Unit(500);
					//---not sure why 100% doesn't work here ---' 'Unit("100%")
					//objText.Width = Unit.Empty
				}
				objText.RenderControl(tw);
				return sw.ToString();
			}
			else
			{
				return null;
			}
		}
		/// -----------------------------------------------------------------------------
		/// <summary>
		/// This class allows us to render the design time mode with custom HTML
		/// </summary>
		/// <remarks>
		/// </remarks>
		/// <history>
		/// 	[Jon Henning]	9/20/2006	Commented
		/// </history>
		/// -----------------------------------------------------------------------------
		public override string GetDesignTimeHtml()
		{
			string strText;
			DNNToolBar objToolbar = (DNNToolBar)base.Component;
			StringWriter sw = new StringWriter();
			HtmlTextWriter tw = new HtmlTextWriter(sw);
			Label objLabel;
			Label objPanelTB;
			objPanelTB = new Label();
			//objPanelTB.Text = "[" & objToolbar.Target & " toolbar]"
			if (!String.IsNullOrEmpty(objToolbar.CssClass)) objPanelTB.CssClass = objToolbar.CssClass; 
			foreach (DNNToolBarButton objBtn in objToolbar.Buttons) {
				objLabel = new Label();
				if (!String.IsNullOrEmpty(objBtn.CssClass)) objLabel.CssClass = objBtn.CssClass; 
				if (!String.IsNullOrEmpty(objBtn.Text)) objLabel.Text = objBtn.Text; 
				objPanelTB.Controls.Add(objLabel);
			}
			objPanelTB.Style.Add("position", "");
			objPanelTB.Style.Add("top", "0px");
			objPanelTB.Style.Add("left", "0px");

			objPanelTB.RenderControl(tw);
			return sw.ToString();
			return strText;

		}
Beispiel #3
0
        public void RenderBindingObject(HtmlTextWriter output)
        {
            if (this.BindingObject == null)
            {
                return;
            }
            TableMapAttribute     tableAttribute = DomainObjectUtility.GetTableMapAttribute(this.BindingObject);
            Hashtable             hs             = DomainObjectUtility.GetAttributeMemberInfos(this.BindingObject);
            IDictionaryEnumerator myEnumerator   = hs.GetEnumerator();
            int cols  = 0;
            int perTd = 100 / (this.Columns * 2);

            while (myEnumerator.MoveNext())
            {
                if ((cols % this.Columns) == 0)
                {
                    if (cols != 0)
                    {
                        output.RenderEndTag();
                    }
                    output.RenderBeginTag(HtmlTextWriterTag.Tr);
                }

                output.AddStyleAttribute(HtmlTextWriterStyle.Width, perTd.ToString() + "%");
                output.AddAttribute(HtmlTextWriterAttribute.Align, "right");
                output.RenderBeginTag(HtmlTextWriterTag.Td);

                System.Web.UI.WebControls.Label lbl = new System.Web.UI.WebControls.Label();
                lbl.ID   = "lbl" + ((FieldMapAttribute)myEnumerator.Key).FieldName;
                lbl.Text = ((MemberInfo)myEnumerator.Value).Name;
                lbl.RenderControl(output);
                output.RenderEndTag();

                output.AddStyleAttribute(HtmlTextWriterStyle.Width, perTd.ToString() + "%");
                output.AddAttribute(HtmlTextWriterAttribute.Align, "left");
                output.RenderBeginTag(HtmlTextWriterTag.Td);

                Type type1 = ((MemberInfo)myEnumerator.Value is FieldInfo) ? ((FieldInfo)myEnumerator.Value).FieldType : ((PropertyInfo)myEnumerator.Value).PropertyType;

                System.Web.UI.WebControls.TextBox txtBox = new System.Web.UI.WebControls.TextBox();
                txtBox.ID = "txt" + ((FieldMapAttribute)myEnumerator.Key).FieldName;
                //txtBox.Text		= DomainObjectUtility.XMLEncodeValue(((FieldMapAttribute)myEnumerator.Key).DataType, type1, DomainObjectUtility.GetValue(this.BindingObject , ((MemberInfo)myEnumerator.Value), null));
                txtBox.RenderControl(output);
                output.RenderEndTag();
                cols = cols + 1;
            }

            if (((cols - 1) % this.Columns) != 0)
            {
                if (cols > 0)
                {
                    output.RenderEndTag();
                }
            }
        }
        public override void RenderControl(System.Web.UI.HtmlTextWriter writer)
        {
            base.RenderControl(writer);
            if (State == ControlState.Designtime || State == ControlState.Preview)
            {
                InternalHiddenField l = new InternalHiddenField();
                l.ID = this.ControlID + "_textboxInternal";      
                l.RenderControl(writer);

                Label label = new Label();
                label.Text = "Keypress event placeholder";
                label.RenderControl(writer);
                
            }
        }
        /*Exporta el archivo a excel*/
        protected void BrnExportar_Click(object sender, EventArgs e)
        {
            Response.Clear();
            Response.AddHeader("content-disposition", "attachment;filename=Proy_x.xls");

            Response.ContentType = "application/vnd.xls";

            System.IO.StringWriter stringWrite = new System.IO.StringWriter();

            System.Web.UI.HtmlTextWriter htmlWrite =
            new HtmlTextWriter(stringWrite);
            Label lbla = new Label();
            lbla.Text = "PRESUPUESTO: " + DropDownList1.SelectedItem.Text;
            lbla.ForeColor =Color.Red;
            lbla.Font.Name = "Calibri";
            lbla.Font.Size = 18;
            lbla.RenderControl(htmlWrite);
            Label lblcap = new Label();
            lblcap.Text = "CAPITULOS";
            lblcap.ForeColor = Color.Red;
            lblcap.Font.Name = "Calibri";
            lblcap.Font.Size = 14;
            Label lblblanco = new Label();
            lblblanco.Text = "";
            lblblanco.RenderControl(htmlWrite);
            htmlWrite.Write("</br>");
               // lblcap.RenderControl(htmlWrite);
            GridView1.RenderControl(htmlWrite);
            Label lblunit = new Label();
            lblunit.Text = "UNITARIOS";
            lblunit.ForeColor = Color.Red;
            lblunit.Font.Name = "Calibri";
            lblunit.Font.Size = 14;
            lblunit.RenderControl(htmlWrite);
            GridView2.RenderControl(htmlWrite);
            Label lblinsu = new Label();
            lblinsu.Text = "INSUMOS";
            lblinsu.ForeColor = Color.Red;
            lblinsu.Font.Name = "Calibri";
            lblinsu.Font.Size = 14;
            lblinsu.RenderControl(htmlWrite);
            GridView3.RenderControl(htmlWrite);
            Response.Write(stringWrite.ToString());

            Response.End();
        }
        /// <summary>
        ///   Adds a new row to the Prevalue Editor, (with an optional description).
        /// </summary>
        /// <param name = "writer">The HtmlTextWriter.</param>
        /// <param name = "label">The label for the field.</param>
        /// <param name = "description">The description for the field.</param>
        /// <param name = "controls">The controls for the field.</param>
        public static void AddPrevalueRow(this HtmlTextWriter writer, string label, string description, params Control[] controls)
        {
            writer.AddAttribute(HtmlTextWriterAttribute.Class, "row clearfix");
            writer.RenderBeginTag(HtmlTextWriterTag.Div); // start 'row'

            writer.AddAttribute(HtmlTextWriterAttribute.Class, "label");
            writer.RenderBeginTag(HtmlTextWriterTag.Div); // start 'label'

            var lbl = new Label { Text = label }; // TODO: Is it possible to include 'AssociatedControlID'?
            lbl.RenderControl(writer);

            writer.RenderEndTag(); // end 'label'

            writer.AddAttribute(HtmlTextWriterAttribute.Class, "field");
            writer.RenderBeginTag(HtmlTextWriterTag.Div); // start 'field'

            foreach (Control control in controls)
            {
                control.RenderControl(writer);
            }

            writer.RenderEndTag(); // end 'field'

            if (!string.IsNullOrEmpty(description))
            {
                writer.AddAttribute(HtmlTextWriterAttribute.Class, "description");
                writer.RenderBeginTag(HtmlTextWriterTag.Div); // start 'description'

                var desc = new Label { Text = description };
                desc.RenderControl(writer);

                writer.RenderEndTag(); // end 'description'
            }

            writer.RenderEndTag(); // end 'row'
        }
        /// <summary>
        /// this helper method outputs a label control with various properties for the Smartforms control
        /// it is intended for development and debugging purposes so that you can output the various properties of your custom control
        /// Feel free to add code and properties to the output element
        /// </summary>
        private LiteralControl AddLabelControlWithControlProperties()
        {
            Label propertiesLabel = new Label();
            string id = string.Empty;
            //populate the value of the label control with the properties of your custom control
            switch (base.State)
            {
                case SourceCode.Forms.Controls.Web.Shared.ControlState.Designtime:
                    this.ID = Guid.NewGuid().ToString() + "_propertiesLabel";
                    propertiesLabel.Text = "[ Send Message Receive ]";
                    break;
                case SourceCode.Forms.Controls.Web.Shared.ControlState.Preview:
                    propertiesLabel.Text = "[ Send Message Receive ]";
                    break;
                case SourceCode.Forms.Controls.Web.Shared.ControlState.Runtime:
                    id = this.ID + "_propertiesLabel";
                    //propertiesLabel.Text = "(" + this.GetType().FullName + " - Runtime) " +
                    //    System.Environment.NewLine + "Control Text: " + this.ControlText +
                    //    System.Environment.NewLine + "Control Value: " + this.Value +
                    //    System.Environment.NewLine + "Control Id: " + this.ID +
                    //    System.Environment.NewLine + "Enabled: " + this.IsEnabled +
                    //    System.Environment.NewLine + "Visible: " + this.IsVisible;
                    break;
            }

            //after defining the control, get the control's HTML so we can inject it into the Div placeholder
            string controlHTML = "";

            System.IO.StringWriter stringWriter = new System.IO.StringWriter();
            using (HtmlTextWriter writer = new HtmlTextWriter(stringWriter))
            {
                propertiesLabel.RenderControl(writer);
                controlHTML = writer.InnerWriter.ToString();
            }

            LiteralControl controlProperties = new LiteralControl("<div>" + controlHTML + "</div>");

            return controlProperties;
        }
		/// <summary>
		/// 向页面输出文本框
		/// </summary>
		/// <param name="writer"></param>
		protected override void Render(HtmlTextWriter writer)
		{
			this.ApplyStyle(TextStyle);

			if (this.ReadOnly)
			{
				Label lb = new Label();
				lb.AccessKey = this.AccessKey;
				lb.AppRelativeTemplateSourceDirectory = this.AppRelativeTemplateSourceDirectory;

				foreach (string s in this.Attributes.Keys)
					lb.Attributes.Add(s, this.Attributes[s]);

				foreach (string s in this.Style.Keys)
					lb.Style.Add(s, this.Style[s]);

				lb.ForeColor = this.ForeColor;
				lb.Font.CopyFrom(this.Font);

				lb.ControlStyle.CopyFrom(this.ControlStyle);
				lb.Style["min-height"] = this.Height.ToString();
				lb.Style["height"] = string.Empty;
				//lb.ID = this.ID;
				lb.TabIndex = this.TabIndex;
				lb.TemplateControl = this.TemplateControl;

				string txt = this.Value != DateTime.MinValue ?
					HttpUtility.HtmlEncode(string.Format(this.DisplayFormat, this.Value)) :
					string.Empty;

				txt = txt.Replace("\r\n", "<br>");
				lb.Text = txt;
				lb.ToolTip = this.ToolTip;
				lb.Visible = this.Visible;
				lb.Width = this.Width;

				lb.Style.Add("word-wrap", "break-word");

				lb.RenderControl(writer);

				base.Style["display"] = "none";
				base.Render(writer);
			}
			else
			{
				base.Attributes.Add("class", TextCssClass);
				base.Render(writer);

				writer.Write(this.PlaceholderHtmlNode);

				//writer.Write("<img id='{0}' src='{1}' class='{2}' style='{3}' tabindex='-1' align='absmiddle' />",
				//    this.UniqueID + "_image", (ImageUrl == string.Empty) ? DefaultImageUrl : ResolveUrl(ImageUrl), ImageCssClass, ImageStyle,
				//    this.ReadOnly ? "onclick='return false;'" : string.Empty);
			}
		}
Beispiel #9
0
        /// <summary>
        /// 将此控件呈现给指定的输出参数。
        /// </summary>
        /// <param name="output"> 要写出到的 HTML 编写器 </param>

        protected override void Render(HtmlTextWriter output)
        {
            //在页面中输出控件时,产生一个表格(二行二列),以下是表格的样式
            output.AddAttribute(HtmlTextWriterAttribute.Cellspacing, "0");
            output.AddAttribute(HtmlTextWriterAttribute.Border, "0");
            output.AddAttribute(HtmlTextWriterAttribute.Cellpadding, "0");

            output.AddStyleAttribute("LEFT", this.Style["LEFT"]);
            output.AddStyleAttribute("TOP", this.Style["TOP"]);
            output.AddStyleAttribute("POSITION", "absolute");

            if (Width != Unit.Empty)
            {
                output.AddStyleAttribute(HtmlTextWriterStyle.Width, Width.ToString());
            }
            else
            {
                output.AddStyleAttribute(HtmlTextWriterStyle.Width, "200px");
            }

            output.RenderBeginTag(HtmlTextWriterTag.Table);          //输出表格
            output.RenderBeginTag(HtmlTextWriterTag.Tr);             //表格第一行
            output.AddAttribute(HtmlTextWriterAttribute.Width, "90%");
            output.RenderBeginTag(HtmlTextWriterTag.Td);

            //以下是第一行第一列中文本框的属性及其样式设置

            if (!Enabled)
            {
                output.AddAttribute(HtmlTextWriterAttribute.ReadOnly, "true");
            }

            output.AddAttribute(HtmlTextWriterAttribute.Type, "Text");
            output.AddAttribute(HtmlTextWriterAttribute.Id, ImgEnInputID);
            output.AddAttribute(HtmlTextWriterAttribute.Name, ImgEnInputName);
            output.AddAttribute(HtmlTextWriterAttribute.Value, Text);
            output.AddStyleAttribute(HtmlTextWriterStyle.Width, "100%");
            output.AddStyleAttribute(HtmlTextWriterStyle.Height, "100%");
            output.AddStyleAttribute(HtmlTextWriterStyle.FontFamily, Font.Name);
            output.AddStyleAttribute(HtmlTextWriterStyle.FontSize, Font.Size.ToString());
            output.AddStyleAttribute(HtmlTextWriterStyle.FontWeight, Font.Bold?"bold":"");
            output.AddStyleAttribute(HtmlTextWriterStyle.BackgroundColor, ColorTranslator.ToHtml(BackColor));
            output.AddStyleAttribute(HtmlTextWriterStyle.Color, ColorTranslator.ToHtml(ForeColor));
            output.RenderBeginTag(HtmlTextWriterTag.Input);             //输出文本框
            output.RenderEndTag();
            output.RenderEndTag();
            output.AddAttribute(HtmlTextWriterAttribute.Width, "*");
            output.RenderBeginTag(HtmlTextWriterTag.Td);

            //以下是第一行第二列中按钮的属性及其样式设置

            if (!Enabled)
            {
                output.AddAttribute(HtmlTextWriterAttribute.Disabled, "true");
            }

            output.AddAttribute(HtmlTextWriterAttribute.Type, "Submit");
            output.AddAttribute(HtmlTextWriterAttribute.Id, ImgEnButtonID);
            output.AddAttribute(HtmlTextWriterAttribute.Name, ImgEnButtonName);
            output.AddAttribute(HtmlTextWriterAttribute.Value, ButtonText);
            output.AddStyleAttribute(HtmlTextWriterStyle.Width, "100%");
            //output.AddAttribute(HtmlTextWriterAttribute.Onclick, Page.GetPostBackEventReference(this)); //点击按钮时需要回传服务器来触发后面的OnClick事件

            //output.AddAttribute(HtmlTextWriterAttribute.Style, ButtonStyle);
            output.RenderBeginTag(HtmlTextWriterTag.Input);             //输出按钮
            output.RenderEndTag();
            output.RenderEndTag();

            output.RenderEndTag();
            output.RenderBeginTag(HtmlTextWriterTag.Tr);
            output.AddAttribute(HtmlTextWriterAttribute.Colspan, "2");
            output.RenderBeginTag(HtmlTextWriterTag.Td);
            _Label.RenderControl(output);             //将日历子控件输出
            output.RenderEndTag();
            output.RenderEndTag();
            output.RenderEndTag();
        }
 protected override void Render(HtmlTextWriter writer)
 {
     if (DesignMode || ShowEditMode)
     {
         base.ToolTip = BindingMember;
         base.Render(writer);
     }
     else
     {
         var lab = new Label();
         switch (MaskType)
         {
             case MaskTypes.Phone:
                 lab.Text = Text.FmtFone();
                 break;
             case MaskTypes.Zip:
                 lab.Text = Text.FmtZip();
                 break;
         }
         lab.ToolTip = BindingMember;
         lab.RenderControl(writer);
     }
 }
        private void RenderTransformerConfigurationHeader(HtmlTextWriter writer) {
            Debug.Assert(_pendingTransformer != null);

            if (EnsurePendingData()) {
                Debug.Assert(_pendingConsumer != null && _pendingProvider != null
                             && _pendingConsumerConnectionPoint != null
                             && _pendingProviderConnectionPoint != null);

                string connectionPointName = null;
                string partTitle = null;

                bool isConsumer = (_pendingConsumer == WebPartToConnect);
                if (_pendingConnectionType == ConnectionType.Consumer && isConsumer) {
                    // This happens if we are in a consumer, connecting or reconnecting a provider
                    partTitle = _pendingProvider.DisplayTitle;
                    connectionPointName = _pendingConsumerConnectionPoint.DisplayName;
                }
                else {
                    // This happens if we are reconnecting a consumer from a provider
                    partTitle = _pendingConsumer.DisplayTitle;
                    connectionPointName = _pendingProviderConnectionPoint.DisplayName;
                }

                Label label = new Label();
                label.Page = Page;
                label.ApplyStyle(LabelStyle);
                label.Text = (isConsumer ? ConnectToProviderTitle : ConnectToConsumerTitle);
                label.RenderControl(writer);

                writer.WriteBreak();
                writer.WriteBreak();

                label.ApplyStyle(InstructionTextStyle);
                label.Text = (isConsumer ? ConnectToProviderInstructionText : ConnectToConsumerInstructionText);
                label.RenderControl(writer);

                writer.WriteBreak();
                writer.WriteBreak();

                writer.AddAttribute(HtmlTextWriterAttribute.Border, "0");
                writer.RenderBeginTag(HtmlTextWriterTag.Table);
                writer.RenderBeginTag(HtmlTextWriterTag.Tr);
                writer.RenderBeginTag(HtmlTextWriterTag.Td);

                label.ApplyStyle(LabelStyle);
                label.Text = (isConsumer ? GetText : SendText);
                label.RenderControl(writer);

                writer.RenderEndTag(); // TD
                LabelStyle.AddAttributesToRender(writer, this);
                writer.RenderBeginTag(HtmlTextWriterTag.Td);

                writer.WriteEncodedText(connectionPointName);

                writer.RenderEndTag(); // TD
                writer.RenderEndTag(); // TR
                writer.RenderBeginTag(HtmlTextWriterTag.Tr);
                writer.RenderBeginTag(HtmlTextWriterTag.Td);

                label.Text = (isConsumer ? GetFromText : SendToText);
                label.RenderControl(writer);

                writer.RenderEndTag(); // TD
                LabelStyle.AddAttributesToRender(writer, this);
                writer.RenderBeginTag(HtmlTextWriterTag.Td);

                writer.WriteEncodedText(partTitle);

                writer.RenderEndTag(); // TD
                writer.RenderEndTag(); // TR
                writer.RenderEndTag(); // TABLE

                writer.WriteBreak();

                writer.RenderBeginTag(HtmlTextWriterTag.Hr);
                writer.RenderEndTag(); // HR

                writer.WriteBreak();

                label.ApplyStyle(LabelStyle);
                label.Text = ConfigureConnectionTitle;
                label.RenderControl(writer);

                writer.WriteBreak();
                writer.WriteBreak();
            }
        }
        private void RenderExistingConnection(HtmlTextWriter writer,
                                              string connectionPointName,
                                              string partTitle,
                                              string disconnectEventArg,
                                              string editEventArg,
                                              bool consumer,
                                              bool isActive) {

            Label label = new Label();
            label.Page = Page;
            label.ApplyStyle(LabelStyle);

            writer.RenderBeginTag(HtmlTextWriterTag.Fieldset);

            writer.AddAttribute(HtmlTextWriterAttribute.Border, "0");
            writer.RenderBeginTag(HtmlTextWriterTag.Table);
            writer.RenderBeginTag(HtmlTextWriterTag.Tr);
            writer.RenderBeginTag(HtmlTextWriterTag.Td);

            label.Text = (consumer ? SendText : GetText);
            label.RenderControl(writer);

            writer.RenderEndTag(); // TD
            LabelStyle.AddAttributesToRender(writer, this);
            writer.RenderBeginTag(HtmlTextWriterTag.Td);

            writer.WriteEncodedText(connectionPointName);

            writer.RenderEndTag(); // TD
            writer.RenderEndTag(); // TR
            writer.RenderBeginTag(HtmlTextWriterTag.Tr);
            writer.RenderBeginTag(HtmlTextWriterTag.Td);

            label.Text = (consumer ? SendToText : GetFromText);
            label.RenderControl(writer);

            writer.RenderEndTag(); // TD
            LabelStyle.AddAttributesToRender(writer, this);
            writer.RenderBeginTag(HtmlTextWriterTag.Td);

            writer.WriteEncodedText(partTitle);

            writer.RenderEndTag(); // TD
            writer.RenderEndTag(); // TR
            writer.RenderEndTag(); // TABLE

            WebPartVerb disconnectVerb = DisconnectVerb;
            disconnectVerb.EventArgument = disconnectEventArg;
            RenderVerb(writer, disconnectVerb);
            if (VerbButtonType == ButtonType.Link) {
                writer.Write("&nbsp;");
            }

            if (isActive) {
                WebPartVerb configureVerb = ConfigureVerb;
                if (editEventArg == null) {
                    configureVerb.Enabled = false;
                }
                else {
                    configureVerb.Enabled = true;
                    configureVerb.EventArgument = editEventArg;
                }
                RenderVerb(writer, configureVerb);
            }
            else {
                writer.WriteBreak();
                label.ApplyStyle(ErrorStyle);
                label.Text = ExistingConnectionErrorMessage;
                label.RenderControl(writer);
            }

            writer.RenderEndTag(); // FIELDSET
        }
        private void RenderInstructionTitle(HtmlTextWriter writer) {
            if (this.PartChromeType == PartChromeType.None ||
                this.PartChromeType == PartChromeType.BorderOnly)
                return;

            string instructionTitle = InstructionTitle;
            if (!String.IsNullOrEmpty(instructionTitle)) {
                Label label = new Label();
                if (WebPartToConnect != null) {
                    label.Text = String.Format(CultureInfo.CurrentCulture, instructionTitle, WebPartToConnect.DisplayTitle);
                }
                else {
                    label.Text = instructionTitle;
                }
                label.Page = Page;
                label.ApplyStyle(LabelStyle);
                label.RenderControl(writer);
                writer.WriteBreak();
            }
        }
        // -------------------------------------------------------------------------------------
        /// <summary> 
        /// Render this control to the output parameter specified.
        /// </summary>
        /// <param name="output"> The HTML writer to write out to </param>
        // -------------------------------------------------------------------------------------
        protected override void Render(HtmlTextWriter output)
        {
            if (!Page.ClientScript.IsStartupScriptRegistered("radio2"))
              {
            Page.ClientScript.RegisterClientScriptBlock(this.Page.GetType(), "radio2", "function test3(){}");
              }
              if (m_Question == null)
              {
            output.Write("Set question properties");
            return;
              }

              // --- Render text controls
              if (m_ControlState == ControlState.ReadOnly)
              {
            Literal answer = new Literal();
            string delimStr = "|";
            char[] delimiter = delimStr.ToCharArray();
            string[] answArr = m_Question.Answer.ToString().Split(delimiter);

            foreach (QuestionListItem item in m_Question.QuestionItemList)
            {
              if (CheckAnswer(answArr, item.ItemName))
              {
            answer.Text = answer.Text + "<li><b>" + item.ItemName + "</b><br>";
              }
              else
              {
            answer.Text = answer.Text + "<li>" + item.ItemName + "<br>";
              }
            }

            answer.RenderControl(output);
              }
              else
              {
            //validation
            string mandatory = string.Empty;
            string validationError = string.Empty;
            if ((m_Question.QuestionConstraint != null) && (m_Question.QuestionConstraint.Mandatory))
            {
              mandatory = "!";
            }
            if (ValidationSummary != string.Empty)
            {
              validationError = "*";
            }
            string validationText =
              string.Format("&nbsp;{0}&nbsp;{1}&nbsp;", mandatory, validationError);
            Label validation = new Label();
            validation.CssClass = "ValidationSummary";
            validation.Text = validationText;
            validation.RenderControl(output);
            // delegate the actual rendering to baseclass
            base.Render(output);
              }
        }
        private void RenderConnectToProvidersDropDowns(HtmlTextWriter writer) {
            WebPart webPartToConnect = WebPartToConnect;

            if (webPartToConnect != null) {
                ConsumerConnectionPointCollection consumers =
                    WebPartManager.GetEnabledConsumerConnectionPoints(webPartToConnect);
                bool first = true;
                Label label = new Label();
                label.Page = Page;
                label.AssociatedControlInControlTree = false;
                foreach (ConsumerConnectionPoint consumer in consumers) {
                    DropDownList list = (DropDownList)_connectDropDownLists[consumer];
                    if ((list == null) || !list.Enabled) {
                        continue;
                    }

                    if (first) {
                        string connectToProviderTitle = ConnectToProviderTitle;
                        if (!String.IsNullOrEmpty(connectToProviderTitle)) {
                            label.Text = connectToProviderTitle;
                            label.ApplyStyle(LabelStyle);
                            label.AssociatedControlID = String.Empty;
                            label.RenderControl(writer);
                            writer.WriteBreak();
                        }

                        string connectToProviderInstructionText = ConnectToProviderInstructionText;
                        if (!String.IsNullOrEmpty(connectToProviderInstructionText)) {
                            writer.WriteBreak();
                            label.Text = connectToProviderInstructionText;
                            label.ApplyStyle(InstructionTextStyle);
                            label.AssociatedControlID = String.Empty;
                            label.RenderControl(writer);
                            writer.WriteBreak();
                        }

                        first = false;
                    }

                    writer.RenderBeginTag(HtmlTextWriterTag.Fieldset);

                    writer.AddAttribute(HtmlTextWriterAttribute.Border, "0");
                    writer.RenderBeginTag(HtmlTextWriterTag.Table);
                    writer.RenderBeginTag(HtmlTextWriterTag.Tr);
                    writer.RenderBeginTag(HtmlTextWriterTag.Td);

                    label.ApplyStyle(LabelStyle);
                    label.Text = GetText;
                    label.AssociatedControlID = String.Empty;
                    label.RenderControl(writer);

                    writer.RenderEndTag(); // TD

                    LabelStyle.AddAttributesToRender(writer, this);
                    writer.RenderBeginTag(HtmlTextWriterTag.Td);

                    writer.WriteEncodedText(consumer.DisplayName);

                    writer.RenderEndTag(); // TD
                    writer.RenderEndTag(); // TR
                    writer.RenderBeginTag(HtmlTextWriterTag.Tr);
                    writer.RenderBeginTag(HtmlTextWriterTag.Td);

                    label.Text = GetFromText;
                    label.AssociatedControlID = list.ClientID;
                    label.RenderControl(writer);

                    writer.RenderEndTag(); // TD
                    writer.RenderBeginTag(HtmlTextWriterTag.Td);

                    list.ApplyStyle(EditUIStyle);
                    list.RenderControl(writer);

                    writer.RenderEndTag(); // TD
                    writer.RenderEndTag(); // TR
                    writer.RenderEndTag(); // TABLE

                    WebPartVerb connectVerb = ConnectVerb;
                    connectVerb.EventArgument = String.Join(ID_SEPARATOR.ToString(CultureInfo.InvariantCulture),
                        new string[] { connectEventArgument, consumerEventArgument, consumer.ID });
                    RenderVerb(writer, connectVerb);

                    writer.RenderEndTag(); // FIELDSET
                }
                writer.AddStyleAttribute(HtmlTextWriterStyle.TextAlign, "right");
                writer.RenderBeginTag(HtmlTextWriterTag.Div);
                WebPartVerb cancelVerb = CancelVerb;
                cancelVerb.EventArgument = cancelEventArgument;
                RenderVerb(writer, cancelVerb);
                writer.RenderEndTag();
            }
        }
Beispiel #16
0
        protected override void RenderContents(HtmlTextWriter writer)
        {
            //writer.AddAttribute(HtmlTextWriterAttribute.Border, "0");
            //writer.AddAttribute(HtmlTextWriterAttribute.Cellspacing, "4");

            //writer.RenderBeginTag(HtmlTextWriterTag.Table);
            //writer.RenderBeginTag(HtmlTextWriterTag.Tr);
            //writer.RenderBeginTag(HtmlTextWriterTag.Td);

            this.PartPropertyValue.RenderControl(writer);

            if (_displayErrorMessage)
            {
                writer.WriteBreak();
                Label errorMessage = new Label();
                errorMessage.Text = "Error converting type";
                errorMessage.ApplyStyle(this.Zone.ErrorStyle);
                errorMessage.RenderControl(writer);
            }

            //writer.RenderEndTag();  // Td
            //writer.RenderEndTag();  // Tr
            //writer.RenderEndTag();  // Table
        }
Beispiel #17
0
        protected virtual void RenderCatalogPartLinks(HtmlTextWriter writer) {
            RenderInstructionText(writer);

            CatalogPart selectedCatalogPart = SelectedCatalogPart;
            foreach (CatalogPart catalogPart in CatalogParts) {
                WebPartDescriptionCollection availableWebParts = catalogPart.GetAvailableWebPartDescriptions();
                int count = ((availableWebParts != null) ? availableWebParts.Count : 0);

                string displayTitle = catalogPart.DisplayTitle;
                // 
                string text = displayTitle + " (" + count.ToString(CultureInfo.CurrentCulture) + ")";

                if (catalogPart == selectedCatalogPart) {
                    Label label = new Label();
                    label.Text = text;
                    label.Page = Page;
                    label.ApplyStyle(SelectedPartLinkStyle);
                    label.RenderControl(writer);
                }
                else {
                    Debug.Assert(!String.IsNullOrEmpty(catalogPart.ID));
                    string eventArgument = selectEventArgument + ID_SEPARATOR + catalogPart.ID;

                    ZoneLinkButton linkButton = new ZoneLinkButton(this, eventArgument);
                    linkButton.Text = text;
                    linkButton.ToolTip = SR.GetString(SR.CatalogZoneBase_SelectCatalogPart, displayTitle);
                    linkButton.Page = Page;
                    linkButton.ApplyStyle(PartLinkStyle);
                    linkButton.RenderControl(writer);
                }

                writer.WriteBreak();
            }

            writer.WriteBreak();
        }
Beispiel #18
0
 protected override void Render(HtmlTextWriter writer)
 {
     if (DesignMode || ShowEditMode)
     {
         base.ToolTip = BindingMember;
         base.Render(writer);
     }
     else
     {
         if (TextMode == TextBoxMode.MultiLine)
         {
             var lit = new Literal();
             lit.ID = this.ClientID;
             lit.Text = Util.SafeFormat(Text);
             lit.RenderControl(writer);
         }
         else
         {
             var lab = new Label();
             lab.ID = this.ClientID;
             lab.Text = Text;
             lab.ToolTip = BindingMember;
             lab.RenderControl(writer);
         }
     }
 }
        public override void RenderControl(System.Web.UI.HtmlTextWriter writer)
        {
            base.RenderControl(writer);
            if (State == ControlState.Designtime || State == ControlState.Preview)
            {
                Label l = new Label();
                l.Text = "Silverlight control, design and preview mode.";
                l.RenderControl(writer);
            }

        }
Beispiel #20
0
        private void RenderInstructionText(HtmlTextWriter writer, ref bool firstCell) {
            string instructionText = InstructionText;
            if (!String.IsNullOrEmpty(instructionText)) {
                writer.RenderBeginTag(HtmlTextWriterTag.Tr);
                writer.RenderBeginTag(HtmlTextWriterTag.Td);
                firstCell = false;

                Label label = new Label();
                label.Text = instructionText;
                label.Page = Page;
                label.ApplyStyle(InstructionTextStyle);
                label.RenderControl(writer);

                writer.RenderEndTag();  // Td
                writer.RenderEndTag();  // Tr
            }
        }
        protected override void RenderContents(HtmlTextWriter output)
        {
            if (!string.IsNullOrEmpty(_timePickerXml.Label.Text))
            {
                Label lbl = new Label();
                lbl.ID = string.Format("lbl{0}", _timePickerXml.Name);
                lbl.Text = _timePickerXml.Label.Text;

                if (!string.IsNullOrEmpty(_timePickerXml.Label.Css))
                    lbl.CssClass = _timePickerXml.Label.Css;

                if (!string.IsNullOrEmpty(_timePickerXml.Label.Style))
                {
                    string[] styles = _timePickerXml.Label.Style.Split(';');

                    foreach (string style in styles)
                    {
                        string[] attributes = style.Split(':');

                        if (attributes.Length == 2)
                            lbl.Style.Add(attributes[0], attributes[1]);
                    }
                }

                lbl.RenderControl(output);
            }

            if (!string.IsNullOrEmpty(_timePickerXml.Css))
            {
                this._textBox.CssClass = _timePickerXml.Css;
            }

            if (!string.IsNullOrEmpty(_timePickerXml.Style))
            {
                string[] styles = _timePickerXml.Style.Split(';');

                foreach (string style in styles)
                {
                    string[] attributes = style.Split(':');

                    if (attributes.Length == 2)
                        this._textBox.Style.Add(attributes[0], attributes[1]);
                }
            }

            base.RenderContents(output);
            output.WriteBreak();
        }
 private void RenderExistingConnections(HtmlTextWriter writer)
 {
     WebPartManager webPartManager = base.WebPartManager;
     bool flag = false;
     bool flag2 = false;
     bool flag3 = false;
     if (webPartManager != null)
     {
         WebPart webPartToConnect = this.WebPartToConnect;
         WebPartConnectionCollection connections = webPartManager.Connections;
         foreach (WebPartConnection connection in connections)
         {
             if (connection.Provider == webPartToConnect)
             {
                 if (!flag)
                 {
                     this.RenderInstructionTitle(writer);
                     this.RenderInstructionText(writer);
                     flag = true;
                 }
                 if (!flag2)
                 {
                     writer.RenderBeginTag(HtmlTextWriterTag.Fieldset);
                     base.LabelStyle.AddAttributesToRender(writer, this);
                     writer.RenderBeginTag(HtmlTextWriterTag.Legend);
                     writer.Write(this.ConsumersTitle);
                     writer.RenderEndTag();
                     string consumersInstructionText = this.ConsumersInstructionText;
                     if (!string.IsNullOrEmpty(consumersInstructionText))
                     {
                         writer.WriteBreak();
                         Label label = new Label {
                             Text = consumersInstructionText,
                             Page = this.Page
                         };
                         label.ApplyStyle(base.InstructionTextStyle);
                         label.RenderControl(writer);
                         writer.WriteBreak();
                     }
                     flag2 = true;
                 }
                 this.RenderExistingConsumerConnection(writer, connection);
             }
         }
         if (flag2)
         {
             writer.RenderEndTag();
         }
         foreach (WebPartConnection connection2 in connections)
         {
             if (connection2.Consumer == webPartToConnect)
             {
                 if (!flag)
                 {
                     this.RenderInstructionTitle(writer);
                     this.RenderInstructionText(writer);
                     flag = true;
                 }
                 if (!flag3)
                 {
                     writer.RenderBeginTag(HtmlTextWriterTag.Fieldset);
                     base.LabelStyle.AddAttributesToRender(writer, this);
                     writer.RenderBeginTag(HtmlTextWriterTag.Legend);
                     writer.Write(this.ProvidersTitle);
                     writer.RenderEndTag();
                     string providersInstructionText = this.ProvidersInstructionText;
                     if (!string.IsNullOrEmpty(providersInstructionText))
                     {
                         writer.WriteBreak();
                         Label label2 = new Label {
                             Text = providersInstructionText,
                             Page = this.Page
                         };
                         label2.ApplyStyle(base.InstructionTextStyle);
                         label2.RenderControl(writer);
                         writer.WriteBreak();
                     }
                     flag3 = true;
                 }
                 this.RenderExistingProviderConnection(writer, connection2);
             }
         }
     }
     if (flag3)
     {
         writer.RenderEndTag();
     }
     if (flag)
     {
         writer.WriteBreak();
     }
     else
     {
         this.RenderNoExistingConnection(writer);
     }
 }
 private void RenderExistingConnections(HtmlTextWriter writer) {
     WebPartManager manager = WebPartManager;
     bool headerRendered = false;
     bool consumersHeaderRendered = false;
     bool providersHeaderRendered = false;
     if (manager != null) {
         WebPart webPartToConnect = WebPartToConnect;
         // First, display connections for which we are providers (connections to consumers)
         WebPartConnectionCollection connections = manager.Connections;
         foreach (WebPartConnection connection in connections) {
             if (connection.Provider == webPartToConnect) {
                 if (!headerRendered) {
                     RenderInstructionTitle(writer);
                     RenderInstructionText(writer);
                     headerRendered = true;
                 }
                 if (!consumersHeaderRendered) {
                     writer.RenderBeginTag(HtmlTextWriterTag.Fieldset);
                     LabelStyle.AddAttributesToRender(writer, this);
                     writer.RenderBeginTag(HtmlTextWriterTag.Legend);
                     writer.Write(ConsumersTitle);
                     writer.RenderEndTag(); // Legend
                     string instructionText = ConsumersInstructionText;
                     if (!String.IsNullOrEmpty(instructionText)) {
                         writer.WriteBreak();
                         Label label = new Label();
                         label.Text = instructionText;
                         label.Page = Page;
                         label.ApplyStyle(InstructionTextStyle);
                         label.RenderControl(writer);
                         writer.WriteBreak();
                     }
                     consumersHeaderRendered = true;
                 }
                 RenderExistingConsumerConnection(writer, connection);
             }
         }
         if (consumersHeaderRendered) {
             writer.RenderEndTag(); // Fieldset
         }
         // Then, display connections for which we are consumers (connections to providers)
         foreach (WebPartConnection connection in connections) {
             if (connection.Consumer == webPartToConnect) {
                 if (!headerRendered) {
                     RenderInstructionTitle(writer);
                     RenderInstructionText(writer);
                     headerRendered = true;
                 }
                 if (!providersHeaderRendered) {
                     writer.RenderBeginTag(HtmlTextWriterTag.Fieldset);
                     LabelStyle.AddAttributesToRender(writer, this);
                     writer.RenderBeginTag(HtmlTextWriterTag.Legend);
                     writer.Write(ProvidersTitle);
                     writer.RenderEndTag(); // Legend
                     string instructionText = ProvidersInstructionText;
                     if (!String.IsNullOrEmpty(instructionText)) {
                         writer.WriteBreak();
                         Label label = new Label();
                         label.Text = instructionText;
                         label.Page = Page;
                         label.ApplyStyle(InstructionTextStyle);
                         label.RenderControl(writer);
                         writer.WriteBreak();
                     }
                     providersHeaderRendered = true;
                 }
                 RenderExistingProviderConnection(writer, connection);
             }
         }
     }
     if (providersHeaderRendered) {
         writer.RenderEndTag(); // Fieldset
     }
     if (headerRendered) {
         writer.WriteBreak();
     }
     else {
         RenderNoExistingConnection(writer);
     }
 }
 private void RenderInstructionText(HtmlTextWriter writer)
 {
     string instructionText = this.InstructionText;
     if (!string.IsNullOrEmpty(instructionText))
     {
         Label label = new Label {
             Text = instructionText,
             Page = this.Page
         };
         label.ApplyStyle(base.InstructionTextStyle);
         label.RenderControl(writer);
         writer.WriteBreak();
         writer.WriteBreak();
     }
 }
 private void RenderInstructionText(HtmlTextWriter writer) {
     string instructionText = InstructionText;
     if (!String.IsNullOrEmpty(instructionText)) {
         Label label = new Label();
         label.Text = instructionText;
         label.Page = Page;
         label.ApplyStyle(InstructionTextStyle);
         label.RenderControl(writer);
         writer.WriteBreak();
         writer.WriteBreak();
     }
 }
 private void RenderInstructionTitle(HtmlTextWriter writer)
 {
     if ((this.PartChromeType != System.Web.UI.WebControls.WebParts.PartChromeType.None) && (this.PartChromeType != System.Web.UI.WebControls.WebParts.PartChromeType.BorderOnly))
     {
         string instructionTitle = this.InstructionTitle;
         if (!string.IsNullOrEmpty(instructionTitle))
         {
             Label label = new Label();
             if (this.WebPartToConnect != null)
             {
                 label.Text = string.Format(CultureInfo.CurrentCulture, instructionTitle, new object[] { this.WebPartToConnect.DisplayTitle });
             }
             else
             {
                 label.Text = instructionTitle;
             }
             label.Page = this.Page;
             label.ApplyStyle(base.LabelStyle);
             label.RenderControl(writer);
             writer.WriteBreak();
         }
     }
 }
 private void RenderNoExistingConnection(HtmlTextWriter writer) {
     string noConnection = NoExistingConnectionTitle;
     if (!String.IsNullOrEmpty(noConnection)) {
         Label label = new Label();
         label.Text = noConnection;
         label.Page = Page;
         label.ApplyStyle(LabelStyle);
         label.RenderControl(writer);
         writer.WriteBreak();
         writer.WriteBreak();
     }
     string instructions = NoExistingConnectionInstructionText;
     if (!String.IsNullOrEmpty(instructions)) {
         Label label = new Label();
         label.Text = instructions;
         label.Page = Page;
         label.ApplyStyle(InstructionTextStyle);
         label.RenderControl(writer);
         writer.WriteBreak();
         writer.WriteBreak();
     }
 }
 private void RenderNoExistingConnection(HtmlTextWriter writer)
 {
     string noExistingConnectionTitle = this.NoExistingConnectionTitle;
     if (!string.IsNullOrEmpty(noExistingConnectionTitle))
     {
         Label label = new Label {
             Text = noExistingConnectionTitle,
             Page = this.Page
         };
         label.ApplyStyle(base.LabelStyle);
         label.RenderControl(writer);
         writer.WriteBreak();
         writer.WriteBreak();
     }
     string noExistingConnectionInstructionText = this.NoExistingConnectionInstructionText;
     if (!string.IsNullOrEmpty(noExistingConnectionInstructionText))
     {
         Label label2 = new Label {
             Text = noExistingConnectionInstructionText,
             Page = this.Page
         };
         label2.ApplyStyle(base.InstructionTextStyle);
         label2.RenderControl(writer);
         writer.WriteBreak();
         writer.WriteBreak();
     }
 }
        private void RenderLabel(HtmlTextWriter writer, string id)
        {
            Label lb = new Label();
            lb.AccessKey = this.AccessKey;
            lb.AppRelativeTemplateSourceDirectory = this.AppRelativeTemplateSourceDirectory;

            foreach (string s in this.Attributes.Keys)
                lb.Attributes.Add(s, this.Attributes[s]);

            foreach (string s in this.Style.Keys)
                lb.Style.Add(s, this.Style[s]);

            lb.ForeColor = this.ForeColor;
            lb.Font.CopyFrom(this.Font);
            lb.BackColor = this.BackColor;
            lb.BorderColor = this.BorderColor;
            lb.BorderStyle = this.BorderStyle;
            lb.BorderWidth = this.BorderWidth; ;
            lb.ControlStyle.CopyFrom(this.ControlStyle);
            lb.Height = this.Height;
            lb.ID = id;
            lb.TabIndex = this.TabIndex;
            lb.TemplateControl = this.TemplateControl;

            if (this.SelectedItem != null)
                lb.Text = HttpUtility.HtmlEncode(this.SelectedItem.Text);
            else
                lb.Text = "";

            lb.ToolTip = this.ToolTip;
            lb.Visible = this.Visible;
            lb.Width = this.Width;
            lb.CssClass = this.CssClass;

            lb.RenderControl(writer);
        }
 private void RenderTransformerConfigurationHeader(HtmlTextWriter writer)
 {
     if (this.EnsurePendingData())
     {
         string text = null;
         string displayTitle = null;
         bool flag = this._pendingConsumer == this.WebPartToConnect;
         if ((this._pendingConnectionType == ConnectionType.Consumer) && flag)
         {
             displayTitle = this._pendingProvider.DisplayTitle;
             text = this._pendingConsumerConnectionPoint.DisplayName;
         }
         else
         {
             displayTitle = this._pendingConsumer.DisplayTitle;
             text = this._pendingProviderConnectionPoint.DisplayName;
         }
         Label label = new Label {
             Page = this.Page
         };
         label.ApplyStyle(base.LabelStyle);
         label.Text = flag ? this.ConnectToProviderTitle : this.ConnectToConsumerTitle;
         label.RenderControl(writer);
         writer.WriteBreak();
         writer.WriteBreak();
         label.ApplyStyle(base.InstructionTextStyle);
         label.Text = flag ? this.ConnectToProviderInstructionText : this.ConnectToConsumerInstructionText;
         label.RenderControl(writer);
         writer.WriteBreak();
         writer.WriteBreak();
         writer.AddAttribute(HtmlTextWriterAttribute.Border, "0");
         writer.RenderBeginTag(HtmlTextWriterTag.Table);
         writer.RenderBeginTag(HtmlTextWriterTag.Tr);
         writer.RenderBeginTag(HtmlTextWriterTag.Td);
         label.ApplyStyle(base.LabelStyle);
         label.Text = flag ? this.GetText : this.SendText;
         label.RenderControl(writer);
         writer.RenderEndTag();
         base.LabelStyle.AddAttributesToRender(writer, this);
         writer.RenderBeginTag(HtmlTextWriterTag.Td);
         writer.WriteEncodedText(text);
         writer.RenderEndTag();
         writer.RenderEndTag();
         writer.RenderBeginTag(HtmlTextWriterTag.Tr);
         writer.RenderBeginTag(HtmlTextWriterTag.Td);
         label.Text = flag ? this.GetFromText : this.SendToText;
         label.RenderControl(writer);
         writer.RenderEndTag();
         base.LabelStyle.AddAttributesToRender(writer, this);
         writer.RenderBeginTag(HtmlTextWriterTag.Td);
         writer.WriteEncodedText(displayTitle);
         writer.RenderEndTag();
         writer.RenderEndTag();
         writer.RenderEndTag();
         writer.WriteBreak();
         writer.RenderBeginTag(HtmlTextWriterTag.Hr);
         writer.RenderEndTag();
         writer.WriteBreak();
         label.ApplyStyle(base.LabelStyle);
         label.Text = this.ConfigureConnectionTitle;
         label.RenderControl(writer);
         writer.WriteBreak();
         writer.WriteBreak();
     }
 }
Beispiel #31
0
 protected override void Render(HtmlTextWriter writer)
 {
     writer.AddAttribute(HtmlTextWriterAttribute.Title, BindingMember);
     if (DesignMode || ShowEditMode)
         base.Render(writer);
     else
     {
         var label = new Label();
         label.Text = GetTextValue();
         label.ID = this.UniqueID;
         label.RenderControl(writer);
     }
 }
 private void RenderConnectToProvidersDropDowns(HtmlTextWriter writer)
 {
     WebPart webPartToConnect = this.WebPartToConnect;
     if (webPartToConnect != null)
     {
         ConsumerConnectionPointCollection enabledConsumerConnectionPoints = base.WebPartManager.GetEnabledConsumerConnectionPoints(webPartToConnect);
         bool flag = true;
         Label label = new Label {
             Page = this.Page,
             AssociatedControlInControlTree = false
         };
         foreach (ConsumerConnectionPoint point in enabledConsumerConnectionPoints)
         {
             DropDownList list = (DropDownList) this._connectDropDownLists[point];
             if ((list != null) && list.Enabled)
             {
                 if (flag)
                 {
                     string connectToProviderTitle = this.ConnectToProviderTitle;
                     if (!string.IsNullOrEmpty(connectToProviderTitle))
                     {
                         label.Text = connectToProviderTitle;
                         label.ApplyStyle(base.LabelStyle);
                         label.AssociatedControlID = string.Empty;
                         label.RenderControl(writer);
                         writer.WriteBreak();
                     }
                     string connectToProviderInstructionText = this.ConnectToProviderInstructionText;
                     if (!string.IsNullOrEmpty(connectToProviderInstructionText))
                     {
                         writer.WriteBreak();
                         label.Text = connectToProviderInstructionText;
                         label.ApplyStyle(base.InstructionTextStyle);
                         label.AssociatedControlID = string.Empty;
                         label.RenderControl(writer);
                         writer.WriteBreak();
                     }
                     flag = false;
                 }
                 writer.RenderBeginTag(HtmlTextWriterTag.Fieldset);
                 writer.AddAttribute(HtmlTextWriterAttribute.Border, "0");
                 writer.RenderBeginTag(HtmlTextWriterTag.Table);
                 writer.RenderBeginTag(HtmlTextWriterTag.Tr);
                 writer.RenderBeginTag(HtmlTextWriterTag.Td);
                 label.ApplyStyle(base.LabelStyle);
                 label.Text = this.GetText;
                 label.AssociatedControlID = string.Empty;
                 label.RenderControl(writer);
                 writer.RenderEndTag();
                 base.LabelStyle.AddAttributesToRender(writer, this);
                 writer.RenderBeginTag(HtmlTextWriterTag.Td);
                 writer.WriteEncodedText(point.DisplayName);
                 writer.RenderEndTag();
                 writer.RenderEndTag();
                 writer.RenderBeginTag(HtmlTextWriterTag.Tr);
                 writer.RenderBeginTag(HtmlTextWriterTag.Td);
                 label.Text = this.GetFromText;
                 label.AssociatedControlID = list.ClientID;
                 label.RenderControl(writer);
                 writer.RenderEndTag();
                 writer.RenderBeginTag(HtmlTextWriterTag.Td);
                 list.ApplyStyle(base.EditUIStyle);
                 list.RenderControl(writer);
                 writer.RenderEndTag();
                 writer.RenderEndTag();
                 writer.RenderEndTag();
                 WebPartVerb connectVerb = this.ConnectVerb;
                 connectVerb.EventArgument = string.Join('$'.ToString(CultureInfo.InvariantCulture), new string[] { "connect", "consumer", point.ID });
                 this.RenderVerb(writer, connectVerb);
                 writer.RenderEndTag();
             }
         }
         writer.AddStyleAttribute(HtmlTextWriterStyle.TextAlign, "right");
         writer.RenderBeginTag(HtmlTextWriterTag.Div);
         WebPartVerb cancelVerb = this.CancelVerb;
         cancelVerb.EventArgument = "cancel";
         this.RenderVerb(writer, cancelVerb);
         writer.RenderEndTag();
     }
 }