Contains a value that creates an association between a menu item and an ELEMENT that results in disabling the menu item when the ELEMENT is excluded from an ELEMENTSET.
- Must equal the value defined as the ID of the menu item to be disabled. Each MENULINK must contain one ID.
When a MENULINK is included within the MENULINKS subset of a FEATURELINKS node that is on the list of items to EXCLUDE from a parent ELEMENT, any features referred to by the MENULINK are disabled when this ELEMENT is in the active context.
The benefit of using a MENULINK node is that whenever an ELEMENT in an ELEMENTSET is affected by INCLUDE and EXCLUDE statements, the association between the ELEMENT and the menu item means you do not need to take further action to disable the associated menu item. For example, if you associate the "Add Inherited Form" menu with an INHERITEDFORM ELEMENT, then excluding the INHERITEDFORM ELEMENT on the project also disables the menu item when the project is selected.
When a menu item has no corresponding ELEMENT definition or you want to disable a menu item in a broader scope within your particular project, you can use a MENUCONSTRAINT.
For additional information about naming menu items, see Naming Conventions in Enterprise Templates.
The following MENULINK node prevents the AddWebForm command from appearing on the Project menu when this ELEMENT (codeWebForm) is excluded from an ELEMENTSET.
<ELEMENT> <!-- WebForm --> <ID>codeWebForm</ID> <IDENTIFIERS> <IDENTIFIER> <TYPE>CODE</TYPE> <IDENTIFIERDATA> <NAME>Inherits</NAME> <VALUE>System.Web.UI.Page</VALUE> </IDENTIFIERDATA> </IDENTIFIER> </IDENTIFIERS> <FEATURELINKS> <MENULINKS> <MENULINK>menuProject.AddWebForm</MENULINK> </MENULINKS> </FEATURELINKS> <PROTOTYPES> <PROTOTYPE>[VC#]\CSharpProjectItems\CSharpAddWebFormWiz.vsz</PROTOTYPE> <PROTOTYPE>[VB]\VBProjectItems\WebForm.vsz</PROTOTYPE> </PROTOTYPES> </ELEMENT>