ToolBarMenuButton.AddMenuItem method (String, String, String, String, String, String)
Adds a menu item to the toolbar menu button with the specified identifier, display name, image URL, description, navigate URL, and script.
Namespace: Microsoft.SharePoint.WebControls
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Overridable Function AddMenuItem ( _
id As String, _
displayName As String, _
imageUrl As String, _
description As String, _
navigateUrl As String, _
onClickScript As String _
) As MenuItemTemplate
'Usage
Dim instance As ToolBarMenuButton
Dim id As String
Dim displayName As String
Dim imageUrl As String
Dim description As String
Dim navigateUrl As String
Dim onClickScript As String
Dim returnValue As MenuItemTemplate
returnValue = instance.AddMenuItem(id, _
displayName, imageUrl, description, _
navigateUrl, onClickScript)
public virtual MenuItemTemplate AddMenuItem(
string id,
string displayName,
string imageUrl,
string description,
string navigateUrl,
string onClickScript
)
Parameters
id
Type: System.StringThe identifier of the menu item.
displayName
Type: System.StringThe name displayed in the UI for the menu item.
imageUrl
Type: System.StringThe URL of the image displayed for the menu item.
description
Type: System.StringThe description of the menu item.
navigateUrl
Type: System.StringThe URL to navigate to when the menu item is selected.
onClickScript
Type: System.StringThe script that runs when the menu button is selected.
Return value
Type: Microsoft.SharePoint.WebControls.MenuItemTemplate
The menu item.
Remarks
There is no permission check for this menu item.