Adsence750x90

Thursday, July 1, 2010

How to Find Controls in Content Page

How to find content page control in ASP.NET?
ContentPlaceHolder contentPage = Master.FindControl("ContentPlaceHolder1") as ContentPlaceHolder;
        Button button =contentPage.FindControl("Button1") as Button;
        if (button != null)
        {
            button.Text = "Message";
        }

No comments: