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";
- }
ContentPlaceHolder contentPage = Master.FindControl("ContentPlaceHolder1") as ContentPlaceHolder;
Button button =contentPage.FindControl("Button1") as Button;
if (button != null)
{
button.Text = "Message";
}
No comments:
Post a Comment