MenuItemTemplate.ClientOnClickUsingPostBackEventFromControl Method (Control, String)
Sets the ClientOnClickScript property by using the client-side Ecms script that causes a post back by using the specified server control and token-replacement parameter.
Namespace: Microsoft.SharePoint.WebControls
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public Sub ClientOnClickUsingPostBackEventFromControl ( _
control As Control, _
argument As String _
)
'Usage
Dim instance As MenuItemTemplate
Dim control As Control
Dim argument As String
instance.ClientOnClickUsingPostBackEventFromControl(control, _
argument)
public void ClientOnClickUsingPostBackEventFromControl(
Control control,
string argument
)
Parameters
control
Type: System.Web.UI.ControlThe server control to process the post back.
argument
Type: System.StringThe parameter passed to the server control.
Examples
The following example shows how you can use a token-replacement parameter as a postback argument.
MenuItemTemplate editCustomer =
new MenuItemTemplate("Edit", "/images/delete.gif");
editCustomer.ClientOnClickUsingPostBackEventFromControl(ToolBarControl,
"Delete;ItemId=%ItemId%");
Dim editCustomer As New MenuItemTemplate("Edit", "/images/delete.gif")
editCustomer.ClientOnClickUsingPostBackEventFromControl(ToolBarControl, "Delete;ItemId=%ItemId%")