Renders a list item in the System.Web.UI.WebControls.CheckBoxList control.
- itemType
One of the System.Web.UI.WebControls.ListItemType enumeration values.
- repeatIndex
An ordinal index that specifies the location of the item in the list control.
- repeatInfo
A System.Web.UI.WebControls.RepeatInfo object that represents the information used to render the item in the list.
- writer
An System.Web.UI.HtmlTextWriter object that represents the output stream to render HTML content on the client.
This method is used primarily by control developers in custom controls that derive from the System.Web.UI.WebControls.CheckBoxList class.
The CheckBoxList.Render(System.Web.UI.HtmlTextWriter) implementation for a System.Web.UI.WebControls.CheckBoxList control calls the RepeatInfo.RenderRepeater(System.Web.UI.HtmlTextWriter, IRepeatInfoUser, Style, WebControl) method, which in turn uses the CheckBoxList.RenderItem(ListItemType, int, RepeatInfo, System.Web.UI.HtmlTextWriter) method to render individual checkbox list items.
The CheckBoxList.RenderItem(ListItemType, int, RepeatInfo, System.Web.UI.HtmlTextWriter) method for a System.Web.UI.WebControls.CheckBoxList control ignores the itemType and repeatInfo parameters. The repeatIndex value is used to select the checkbox list item in the ListControl.Items collection, and the selected list item is rendered to the output stream.