Fairly new to ASP.net. I have a masterpage with several user controls embedded in it. Please could someone explain how to (or why I cant) share variables or properties between the master page and the user control.
Here is what I was trying:
The master page .vb file:
Partial Class Site
Dim content_idno As Int32 = 0
Private _breadcrumbs As String
Public Property breadcrumbs() As String
Set(ByVal value As String)
_breadcrumbs = value
In the user control I have tried things like:
Dim _masterpage As MasterPage = CType(Me.Page.Master, MasterPage)
But nothing seems to work I can access other controls in the masterpage from the user control using:
Dim RightCol As PlaceHolder
RightCol = CType(Me.Page.Master.FindControl("RightCol"), PlaceHolder)
How do I access the public property?