c# - this.Controls doesn't contain all controls -


one text box in particular has been skipped. textbox id "q3txt" inside panel hidden @ pageload method.

yet becomes visible before function collects controls.

every other textbox collected.

i've tried ienumberable collection of textboxes, didn't work.

how can make textbox appear in controls list?

here html:

<p id="question3text" runat="server" class="question"></p> <asp:radiobuttonlist runat="server" id="q3_rblist" autopostback="true" onselectedindexchanged="q3_rblist_selectedindexchanged"> </asp:radiobuttonlist> <asp:panel runat="server" id="q3panel">     <p>if no, when did data collection stop?</p>     <asp:textbox runat="server" id="q3txt"></asp:textbox> </asp:panel><br /><br /> 

and part of c# code:

foreach (var item in this.controls.oftype<textbox>()) {     //some code } 

that specific textbox part of specific panel should inside of panel.controls instead of this.controls


Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -