Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

FindControl

$
0
0

Hi all,

I've troubles to find a label in a structure as follows:

<asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0"><asp:TabPanel ID="TabPanel4" HeaderText="Info" runat="server"><ContentTemplate><asp:Panel ID="Panel3" runat="server" ></asp:Panel>

I try to access that label as follows:

Label lblID = (Label)TabContainer1.FindControl("TabPanel4").FindControl("Panel3").FindControl("lblID");

But the value of the label is null, and I have an error runtime.

How can I catch that label?

Thanks


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>