Sometimes we need to access the master page controls in content pages,
see the below sample code how to access master page control from content page.
Label lblName = (Label)Master.FindControl("lblUsername");
lblName.Text = "Test Name";
Label lblName = (Label)Master.FindControl("lblUsername");
lblName.Text = "Test Name";
No comments:
Post a Comment