System.Web.UI.WebControls.RadioButtonList.RenderItem Method

Renders a list item in the System.Web.UI.WebControls.RadioButtonList control.

Syntax

protected virtual void RenderItem (ListItemType itemType, int repeatIndex, RepeatInfo repeatInfo, System.Web.UI.HtmlTextWriter writer)

Parameters

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 that represents the information used to render the item in the list.
writer
A System.Web.UI.HtmlTextWriter that represents the output stream to render HTML content on the client.

Remarks

This method is used primarily by control developers in custom controls that derive from the System.Web.UI.WebControls.RadioButtonList class.

The RadioButtonList.Render(System.Web.UI.HtmlTextWriter) method implementation for a System.Web.UI.WebControls.RadioButtonList control initializes a System.Web.UI.WebControls.RepeatInfo object for the list, and calls the RepeatInfo.RenderRepeater(System.Web.UI.HtmlTextWriter, IRepeatInfoUser, Style, WebControl) method, which in turn uses the RadioButtonList.RenderItem(ListItemType, int, RepeatInfo, System.Web.UI.HtmlTextWriter) method to render individual radio-button list items.

The RadioButtonList.RenderItem(ListItemType, int, RepeatInfo, System.Web.UI.HtmlTextWriter) method for a System.Web.UI.WebControls.RadioButtonList control ignores the itemType and repeatInfo parameters. The repeatIndex parameter value is used to select the radio button list item in the ListControl.Items collection, and the selected list item is rendered to the output stream.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0