本文整理汇总了C#中System.Web.UI.HtmlControls.HtmlInputCheckBox.RenderControl方法的典型用法代码示例。如果您正苦于以下问题:C# HtmlInputCheckBox.RenderControl方法的具体用法?C# HtmlInputCheckBox.RenderControl怎么用?C# HtmlInputCheckBox.RenderControl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.UI.HtmlControls.HtmlInputCheckBox
的用法示例。
在下文中一共展示了HtmlInputCheckBox.RenderControl方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}