Can you access controls on the Master Page without using FindControl() method?

 Posted by deccansoft on 10/30/2010 | Category: ASP.NET Interview questions | Views: 3135

Yes, by casting the Master to your MasterPage as shown in the below code sample.
protected void Page_Load(object sender, EventArgs e)
{ MyMasterPage MMP = this.Master; MMP.MyTextBox.Text = "Text Box Found"; }

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response