Export (0) Print
Expand All

RepeaterItem Constructor

Initializes a new instance of the RepeaterItem class.

[Visual Basic]
Public Sub New( _
   ByVal itemIndex As Integer, _
   ByVal itemType As ListItemType _
)
[C#]
public RepeaterItem(
   int itemIndex,
 ListItemType itemType
);
[C++]
public: RepeaterItem(
   int itemIndex,
 ListItemType itemType
);
[JScript]
public function RepeaterItem(
   itemIndex : int,
 itemType : ListItemType
);

Parameters

itemIndex
The index of the item in the Repeater control from the Items collection of the control.
itemType
One of the ListItemType values.

Remarks

Use this constructor to create and initialize a new instance of the RepeaterItem class.

Example

[Visual Basic, C#, C++] The following example demonstrates how to create and initialize a new instance of the RepeaterItem class.

[Visual Basic] 
Sub Page_Load(sender As Object, e As EventArgs)
    Dim index As Integer = 0
    Dim myItem As New RepeaterItem(index, ListItemType.Item)
End Sub


[C#] 
void Page_Load(Object sender, EventArgs e) 
{
   int index = 0;
   RepeaterItem myItem = new RepeaterItem(index, ListItemType.Item);
}
   

[C++] 
void Page_Load(Object* /*sender*/, EventArgs* /*e*/) 
{
   int index = 0;
   RepeaterItem* myItem = new RepeaterItem(index, ListItemType::Item);
}
   

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

RepeaterItem Class | RepeaterItem Members | System.Web.UI.WebControls Namespace | Repeater | ListItemType

Show:
© 2014 Microsoft