Master Page Properties

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?
 
G

Guest

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; }
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top