RepeaterCommandEventArgs.Item 属性

定义

获取与该事件关联的 RepeaterItem

public:
 property System::Web::UI::WebControls::RepeaterItem ^ Item { System::Web::UI::WebControls::RepeaterItem ^ get(); };
public System.Web.UI.WebControls.RepeaterItem Item { get; }
member this.Item : System.Web.UI.WebControls.RepeaterItem
Public ReadOnly Property Item As RepeaterItem

属性值

RepeaterItem

与该事件关联的 RepeaterItem

示例

以下示例演示如何从 Item 属性中确定索引号。

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

注解

使用此属性访问与此事件关联的属性 RepeaterItem

适用于

另请参阅