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 .
There are actually several ways to accomplish this:
Create a public property in your user control
public Button PageButton { get; set; }
Then assign it in the page's OnInit or OnLoad method
myUserControl.PageButton = myPageButton;
You can make the control public and unbox Page:
public Button PageButton { get { return this.myPageButton; } }
In the user control:
MyPage myPage = (MyPage)this.Page;
myPage.PageButton.Text = "Hello";
The slowest, but easiest way would be to use FindControl:
this.Page.FindControl("myPageButton");