This documentation is archived and is not being maintained.

RepeaterCommandEventArgs.Item Property

Gets the RepeaterItem associated with the event.

[Visual Basic]
Public ReadOnly Property Item As RepeaterItem
public RepeaterItem Item {get;}
public: __property RepeaterItem* get_Item();
public function get Item() : RepeaterItem;

Property Value

The RepeaterItem associated with the event.


Use this property to access the properties of the RepeaterItem associated with this event.


[Visual Basic, C#, C++] The following example demonstrates how to determine the index number from the Item property.

[Visual Basic] 
Sub R1_ItemCommand(Sender As Object, e As RepeaterCommandEventArgs)
    Label2.Text = "The index of the item is " & e.Item.ItemIndex.ToString()
End Sub

void R1_ItemCommand(Object Sender, RepeaterCommandEventArgs e) {        
    Label2.Text = "The index of the item is " + e.Item.ItemIndex.ToString();

void R1_ItemCommand(Object* /*Sender*/, RepeaterCommandEventArgs* e) {
    Label2->Text = String::Format( S"The index of the item is {0}", __box(e->Item->ItemIndex));

[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.


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

See Also

RepeaterCommandEventArgs Class | RepeaterCommandEventArgs Members | System.Web.UI.WebControls Namespace | RepeaterItem