Is there a way to access page controls from user control . I have some controls in my page and i want to access these controls from the user control .
its work for me :
I declare Label in My .aspx page
In .aspx.cs I have add UserControl through Panel
UserControl objControl = (UserControl)Page.LoadControl("~/ts1.ascx");
pnlUC.Controls.Add(objControl);
and access from in .ascx UserControl like this :
Page page = this.Page;
Label lbl = page.FindControl("lblpage") as Label;
string textval = lbl.Text;