Gets or sets the client side JavaScript code to be executed when this item is clicked.
[Visual Basic]
Public Property OnClickScript As
String
[C#]
public
String OnClickScript {get; set;}
Property Value
System.String
The JavaScript code that is executed at client side when mouse is clicked on this item.
This property is read/write.
Remarks
Set inline JavaScript code to this property instead of JavaScript function name. To specify a JavaScript function name, use ClientSideOnItemClick property.
When both this property and ClientSideOnItemClick are specified, The code specified in OnClickScript is executed before the function specified in ClientSideOnItemClick.
If RaisesServerEvent is evaluated to true, server event will be raised after client side script is executed. See ClientSideOnItemClick property for details and code examples.
In general, when mouse is clicked on an item, the event is handled in the following order:
- NavigationItem.OnClickScript - Client side event handler
- BaseNavigator.ClientSideOnItemClick - Client side event handler
- NavigationItem.NavigateUrl - Redirect to the URL without executing server side event
- BaseNavigator.ItemClick - Server side event
See handling client side events for more details.
See Also
NavigationItem Class | EO.Web Namespace | ClientSideOnItemClick