Si es un imagebutton
Puede ser asi
Código ASP:
Ver originalPublic Sub DoctoFavorites(ByVal sender As Object, ByVal e As ImageClickEventArgs)
Dim ib As ImageButton = DirectCast(sender, ImageButton)
Dim index As Integer = Convert.ToInt32(ib.CommandArgument)
Dim lb As LinkButton = DirectCast(gvwFiles.Rows(index).FindControl("gvlnkname"), LinkButton)
end sub
Eso lo asocias al evento onclick del boton