How can you find a control in an ASP.NET page from code behind

Lets suppose we have an ASP.NET page and we have the following control in it: <asp:Label runat="server" ID="label1"></asp:Label> To find the control in the page from code behind, you have to do the following: Label lbl = this.FindControl("label1") as Label; This will work in any normal ASP.NET page, but will not work if you using a Master …

Continue reading How can you find a control in an ASP.NET page from code behind

Advertisements