I found something for aspx files: <%@ MasterType
VirtualPath="MasterPage.master" %>. The problem is when I run it I have the
following problem: parser error: The file 'MasterPage.master' doesn't exist.
My MasterPage is called Layout.master. Even when I try the virtual path as
the actual file name, it says no circular references allowed. Any ideas why
it doesnt work?
When I get it to work I should be able to do something like:
MasterPageName.MainMenu //whatever to the main menu
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:4E**********************************@microsof t.com...
Andy,
Perhaps a set property isn't such a good idea? It might be a better
idea to get the menu passed to you through a method and perform your
operations through there.
Are you asking how to access the Menu in the property (through the
value keyword) or are you asking how to set all those properties on the
Menu instance?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Andy B" <a_*****@sbcglobal.netwrote in message
news:eS**************@TK2MSFTNGP05.phx.gbl...
>>I have the property below. What I need to do is access the asp.net Menu
controls MenuItems in a content page that are on a master page. I need to
set the Enabled state to false when the page loads and re enable it when
the page goes to the next one. Any ideas how to finish this one? Or if I
got it wrong?
//return the main menu so other pages can use it.
public Menu Menu {
get { return MainMenu; }
set { }
}