How to access a button value clicked in a repeater control


add an 'onclick' attribute to your button and the Button_Click event

 

Protected Sub Button_Click(ByVal sender As Object, ByVal e As EventArgs)

'Get the reference of the clicked button.
Dim button As Button = CType(sender, Button)
'Get the Repeater Item reference
Dim item As RepeaterItem = CType(button.NamingContainer, RepeaterItem)
'Get the repeater item index
Dim index As Integer = item.ItemIndex
'Do something with the index

End Sub

Tags: repeater
Last update:
2014-09-15 20:26
Author:
Mark
Revision:
1.0
Average rating:0 (0 Votes)

You cannot comment on this entry

Chuck Norris has counted to infinity. Twice.

Records in this category

Tags