Label myLabel = (Label)Page.FindControl("myLabelID"); myLabel.Text = "Hello, world!";
Panel panel1 = (Panel)Page.FindControl("panel1ID"); Label nestedLabel = (Label)panel1.FindControl("nestedLabelID"); nestedLabel.Text = "Nested label text";In this example, we have a `Panel` control with the ID "panel1ID" on the current page. Inside this panel, there is a label control with the ID "nestedLabelID". To find this nested label control, we first use `Control.FindControl` to find the panel control, and then call `FindControl` again on the panel to find the nested label control. Once we have a reference to the nested label control (`nestedLabel`), we can change its `Text` property to update the text that is displayed on the web page. The `Control.FindControl` method is part of the `System.Web.UI` namespace in the `System.Web` assembly.