Call Repeater ItemCommand event manually from outside the repeater
Following is the code to call repeater item command event manually
Private Sub btnTest_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnTest.Click
For i = 0 To rptPlayers.Items.Count – 1
Dim tItem As RepeaterItem = rptPlayers.Items(i)
Dim tButton As ImageButton = ptPlayers.Items(i).FindControl(“imgAdd”)
Dim tEvents As New System.Web.UI.WebControls.CommandEventArgs(tButton.CommandName, tButton.CommandArgument)
Dim rpt As New RepeaterCommandEventArgs(tItem, tButton, tEvents)
rptPlayers_ItemCommand(tButton, rpt)
Next
End Sub
Categories: ASP.NET
Comments (0)
Trackbacks (0)
Leave a comment
Trackback
Comments