当前位置: 首页>>代码示例>>C#>>正文


C# HtmlInputButton.RenderControl方法代码示例

本文整理汇总了C#中System.Web.UI.HtmlControls.HtmlInputButton.RenderControl方法的典型用法代码示例。如果您正苦于以下问题:C# HtmlInputButton.RenderControl方法的具体用法?C# HtmlInputButton.RenderControl怎么用?C# HtmlInputButton.RenderControl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Web.UI.HtmlControls.HtmlInputButton的用法示例。


在下文中一共展示了HtmlInputButton.RenderControl方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RenderDivShowHide

        private void RenderDivShowHide(HtmlTextWriter writer)
        {
            writer.AddAttribute(HtmlTextWriterAttribute.Class, "itemlistcontainer");
            writer.AddAttribute(HtmlTextWriterAttribute.Id, this.ClientID + "_DivShowHide");
            writer.AddAttribute("itemalign", ItemAlign.ToString());
            writer.AddAttribute(HtmlTextWriterAttribute.Style, "display: none; z-index: 500;");

            writer.RenderBeginTag(HtmlTextWriterTag.Div);

            writer.AddAttribute(HtmlTextWriterAttribute.Style, "padding: 5px;");
            writer.RenderBeginTag(HtmlTextWriterTag.Div);
            RenderCheckBoxDiv(writer);
            writer.RenderEndTag();

            writer.AddAttribute(HtmlTextWriterAttribute.Class, "divconfirm");
            writer.RenderBeginTag(HtmlTextWriterTag.Div);

            if (ShowCheckAll && SingleMode == SingledType.NotSet)
            {
                HtmlInputCheckBox cb = new HtmlInputCheckBox();
                cb.ID = this.ClientID + "_SelectAll";
                cb.Attributes.Add("onclick", "CheckBoxSelectAll('" + this.ClientID + "');");
                cb.RenderControl(writer);

                writer.AddAttribute("for", this.ClientID + "_SelectAll");
                writer.RenderBeginTag(HtmlTextWriterTag.Label);
                writer.Write("全选 ");
                writer.RenderEndTag();
                writer.Write(" ");
            }

            HtmlInputButton confirm = new HtmlInputButton();
            confirm.Value = "确 定";
            confirm.Attributes.Add("class", "btn");
            confirm.Attributes.Add("onclick", "CheckBoxListConfirm('" + this.ClientID + "'); HideComboBoxDiv('" + this.ClientID + "');");
            confirm.RenderControl(writer);

            writer.Write(" ");

            HtmlInputButton cancel = new HtmlInputButton();
            cancel.Value = "取 消";
            cancel.Attributes.Add("class", "btn");
            cancel.Attributes.Add("onclick", "HideComboBoxDiv('" + this.ClientID + "');");
            cancel.RenderControl(writer);

            writer.RenderEndTag();
            writer.RenderEndTag();
        }
开发者ID:dollarsxu,项目名称:ComboBox,代码行数:48,代码来源:CheckBoxExtend.cs

示例2: RenderButton

 /// <summary>Renders the open popup button.</summary>
 private void RenderButton(HtmlTextWriter writer)
 {
     HtmlInputButton hib = new HtmlInputButton();
     hib.ID = ID + "-button";
     hib.Value = ButtonText;
     hib.Attributes["class"] = "popupButton selectorButton";
     Controls.Add(hib);
     hib.Attributes["onclick"] = string.Format(OpenPopupFormat,
                                               N2.Web.Url.ResolveTokens(BrowserUrl),
                                               ClientID,
                                               PopupOptions,
                                               DefaultMode,
                                               AvailableModes);
     hib.RenderControl(writer);
 }
开发者ID:spmason,项目名称:n2cms,代码行数:16,代码来源:UrlSelector.cs


注:本文中的System.Web.UI.HtmlControls.HtmlInputButton.RenderControl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。