System.Web.UI.WebControls Namespace RepeaterItem Class
Returns the type of an item in a Repeater control.
Script |
[ ListItemType variable = ] RepeaterItem.ItemType |
The property is read only with no default value.
Use the ItemType property to determine the type of a RepeaterItem in a given Repeater control.
The following example demonstrates how to use the ItemType property to determine the type of an item in a Repeater control. The order in which the items are positioned in the Repeater is displayed along with the item type.
foreach ( RepeaterItem item in myRepeater.Items ) {
msg.Text += "<br>" + item.ItemIndex + " " + item.ItemType;
}
dim item as RepeaterItem
for each item in myRepeater.Items
msg.Text &= "<br>" & item.ItemIndex & " " & item.ItemType
next |
|
C# |
VB |
Show me
RepeaterItem Members ItemIndex