This is a migrated thread and some comments may be shown as answers.

Captureing custom key presses W/O use of JS

2 Answers 22 Views
Documentation and Tutorials
This is a migrated thread and some comments may be shown as answers.
Casper
Top achievements
Rank 1
Casper asked on 01 Apr 2015, 09:04 AM
Hi,
I am in the situation that I have some data in a container class in my codebehind. I need to be able to access this data when i capture a keypress whic means that the approach the article on keypresses can't be used since i have to capture and process the keypress in JS. Is there a way to capture this in the codebehind?

The article I am talking about is http://www.telerik.com/help/aspnet-ajax/grid-onkeypress.html 

Regards
Casper Andersen

2 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 02 Apr 2015, 07:08 AM

Hi Casper,

Keyboard interaction happens only in the browser, i.e., on the client. This context is absolutely separate from the server code and in order to transmit the user interactions to the server, you would need to initiate some request and pass the data.

One of the simplest ways is to use RadAjax and the ajaxRequest() method we offer: http://www.telerik.com/help/aspnet-ajax/ajax-client-side-api.html. The following blog post can show you other ideas: http://blogs.telerik.com/aspnet-ajax/posts/13-03-21/different-ways-to-make-a-request-to-the-server.

Regards,

Marin Bratanov
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Casper
Top achievements
Rank 1
answered on 08 Apr 2015, 09:09 AM

Thanks a lot :) I'll look into it

 

/Casper

Tags
Documentation and Tutorials
Asked by
Casper
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Casper
Top achievements
Rank 1
Share this question
or