my problem is:
I have a webpage that looks kinda like this:
<asp:PlaceHolder ID="Formular" runat="server">
<table>
<tr runat="server" visible="true" id="1">
<td> <asp:TextBox ID="TextBox13" runat="server" AutoPostBack="true" OnTextChanged="tb_Changed" CssClass="tx"></asp:TextBox>
</td>
</table>
</asp:PlaceHolder>
Now i want loop through all controls on webpage but of course, i can't access that TextBox13 with this code:
Dim tb as TextBox
For Each ctrl In Formular.Controls
If TypeOf ctrl Is TextBox Then
tb = ctrl
If tb.Text.Trim.Length = 0 Then
tb.Style("background-color") = "red"
count += count + 1
Else
tb.Style("background-color") = "white"
End If
End If
Next
Is there any elegant easy way to access that textbox?
Reason why i'm not hiding that table row with javascript is because code of this page will be used later somewhere else and it will be much easier w/o any javascripts.