Property in Master Page

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

Hello,

I created a property in my master page and I want to expose a panel to
the page which uses this master:

Private _Center As Panel
Public Property Center() As Panel
Get
Return _Center
End Get
Set(ByVal value As Panel)
_Center = value
End Set
End Property

In my page I tried to do something like:

Master.Center.Visible = True

Center is not recnognized.

What am I doing wrong or missing?

Thanks,

Miguel
 
Miguel,
When you access Master inside a normal page, the Master is a generic
MasterPage. You have to specifically cast Master to the type of your
MasterPage. That will expose the custom properties available to the
masterpage you created.
 
Back
Top