Skip to content

dxstanley/how-to-handle-a-specific-event-within-a-whole-document-object-and-handle-keyboard-pressing-e3845

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to handle a specific event within a whole document object and handle keyboard pressing

This example illustrates how to:
- Handle a specific event (for example, "keydown") within a whole document object;
- Perform a specific action when a specific keyboard key (for example, ESC) is pressed.

The client-side ASPxClientUtils.AttachEventToElement method allows for attaching a handler to the "keydown" event over the "document" object.

ASPxButton.aspx:
Clicking the "Escape" key calls the client-side ASPxClientButton.DoClick method and invokes the custom alert message to inform an end-user of the clicked key.

OBSOLETE:

Starting with version v2014 vol 2 (v14.2), this functionality is available out of the box. Simply set the ASPxPopupControl.CloseOnEscape property to true to activate it. Please refer to the Popup Control - Main Features demo to see this feature in action.

ASPxPopupControl.aspx:
Clicking the "Escape" key hides ASPxPopupControl via the client-side ASPxClientPopupControl.Hide method.

Description



Releases

No releases published

Packages

No packages published

Languages

  • Classic ASP 92.6%
  • C# 7.4%