Master Page Properties

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm looking at this book on Professional ASP.Net 2.0 (Wrox) and it indicates
that if I want to alter a control property which is on the master page, that
I need to create a public property on the master page which returns the
desired control.

I have done this, but Intellisense does not show me this property, nor will
the application compile when I reference it as follows:

Master.MyControl.Text = "Fred";

What am I missing?
 
The issue is that "Master.MyControl" is not a valid object. The issue is not
that I need to reclass the object to a text box.

Why is master.mycontrol not recognized as a valid object.

In my Master page I set up a property as follows:

public Label MyControl
{
get { return lbl1; }
}
 
Back
Top