Allora, la tabella è dentro un Content in una struttura Master Page.
codice:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim r As HtmlTableRow = TryCast(FindControlRecursive(Me, "tr_" & 1), HtmlTableRow)
If r IsNot Nothing Then
r.Visible = False
l.PrintLn("trovato")
Else
l.PrintLn("non trovato")
End If
End Sub
dove FindControlRecursive è:
codice:
Public Function FindControlRecursive(ByVal ctrl As Control, ByVal id As String) As Control
If ctrl.ID = id Then Return ctrl
Dim childCtrl As Control
For Each childCtrl In ctrl.Controls
Dim resCtrl As Control = FindControlRecursive(childCtrl, id)
If Not resCtrl Is Nothing Then Return resCtrl
Next
Return Nothing
End Function