The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxClientUtils.PreventEventAndBubble(htmlEvent) Method

Cancels both the specified event's default action and the event's bubbling upon the hierarchy of event handlers.


static PreventEventAndBubble(htmlEvent: any): boolean


Name Type Description
htmlEvent any

An object that specifies the required HTML event.


Type Description

Always false.


You can use this method in the following manner, for instance:

myObject.onmousedown="return ASPxClientUtils.PreventEventAndBubble(event);"


This example demonstrates how the default browser processing of the Enter key, pressed while an ASPxTextBox has input focus, can be canceled with the help of a specific client method of a service ASPxClientUtils client object.

Note that the client script implementing the ASPxClientUtils object should be explicitly registered, to make this object available on the client:

protected void Page_Load(object sender, EventArgs e){
See Also