本文整理匯總了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();
}