Captureing custom key presses W/O use of JS

3 posts, 1 answers
  1. Casper
    Casper avatar
    24 posts
    Member since:
    Mar 2015

    Posted 01 Apr 2015 Link to this post

    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. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 02 Apr 2015 Link to this post

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Casper
    Casper avatar
    24 posts
    Member since:
    Mar 2015

    Posted 08 Apr 2015 in reply to Marin Bratanov Link to this post

    Thanks a lot :) I'll look into it

     

    /Casper

Back to Top