MenuItemTemplate.ClientOnClickNavigateUrl property

Sets or retrieves the URL to open when the menu item is clicked.

Namespace:  Microsoft.SharePoint.WebControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Property ClientOnClickNavigateUrl As String
    Get
    Set
'Usage
Dim instance As MenuItemTemplate
Dim value As String

value = instance.ClientOnClickNavigateUrl

instance.ClientOnClickNavigateUrl = value
public string ClientOnClickNavigateUrl { get; set; }

Property value

Type: System.String
A String that represents the URL.

Remarks

The ClientOnClickNavigateUrl property sets the ClientOnClickScript property to a string representing the Ecma script that opens the URL. If the ClientOnClickScript property is set after the ClientOnClickNavigateUrl property is set, ClientOnClickNavigateUrl is reset to a null reference (Nothing in Visual Basic).

The values for the ClientOnClickNavigateUrl property may contain tokens for client-side replacement, enclosed in percent sign (%) characters.

Examples

This example shows how to include dynamically replaced tokens in a URL. Note that the token values must be properly encoded for use as URL parameters in a quoted Ecma script string literal value. See the ClientOnClickScript property for a more-complete example of client-side token replacement.

MenuItemTemplate editCustomer = 
  new MenuItemTemplate("Edit", "/images/delete.gif");
editCustomer.ClientOnClickNavigateUrl = 
  "/EditCustomer.aspx?Id='%CustomerId%'";
Dim editCustomer As New MenuItemTemplate("Edit", "/images/delete.gif")
editCustomer.ClientOnClickNavigateUrl = "/EditCustomer.aspx?Id='%CustomerId%'"

See also

Reference

MenuItemTemplate class

MenuItemTemplate members

Microsoft.SharePoint.WebControls namespace