MenuItemTemplate.ClientOnClickUsingPostBackEvent property

Sets or retrieves the control ID and parameter for the post-back event.

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

Syntax

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

value = instance.ClientOnClickUsingPostBackEvent

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

Property value

Type: System.String
A String that represents the ID and parameter, separated by a comma.

Remarks

The ClientOnClickUsingPostBackEvent property sets the ClientOnClickScript property with the Ecma script that causes a post back by using the specified parameter.

If the ClientOnClickScript property is set after the ClientOnClickUsingPostBackEvent property is set, ClientOnClickUsingPostBackEvent is reset to a null reference (Nothing in Visual Basic).

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

If the ClientOnClickPostBackConfirmation property has been set, the specified message is displayed in the client browser as a confirmation message after the control is clicked but before the post back.

Examples

The following three examples are functionally equivalent:

<lSharePoint:MenuItemTemplate runat="server" id="DisplayInvoices" 
  Text="Display Invoices" ImageUrl="/images/invoice.gif" 
  ClientOnClickUsingPostBackEvent=
  "InvoiceDetailControl,CustomerId=%CustomerId%" />
MenuItemTemplate displayInvoices = 
  new MenuItemTemplate("Display Invoices", "/images/invoice.gif");
displayInvoices.ClientOnClickUsingPostBackEvent = 
  "InvoiceDetailControl,CustomerId=%CustomerId%");
customerMenu.Add(displayInvoices);
Dim displayInvoices As New MenuItemTemplate("Display Invoices", "/images/invoice.gif")
displayInvoices.ClientOnClickUsingPostBackEvent = "InvoiceDetailControl,CustomerId=%CustomerId%")
customerMenu.Add(displayInvoices)
MenuItemTemplate displayInvoices = 
  new MenuItemTemplate("Display Invoices", "/images/invoice.gif");
displayInvoices.SetClientOnClickUsingPostBackEvent(InvoiceDetailControl, 
  "CustomerId=%CustomerId%");
customerMenu.Add(displayInvoices);
Dim displayInvoices As New MenuItemTemplate("Display Invoices", "/images/invoice.gif")
displayInvoices.SetClientOnClickUsingPostBackEvent(InvoiceDetailControl, "CustomerId=%CustomerId%")
customerMenu.Add(displayInvoices)

See also

Reference

MenuItemTemplate class

MenuItemTemplate members

Microsoft.SharePoint.WebControls namespace