Save a Form using Ctrl + S????

Last post 12-06-2007 1:00 AM by moredotnet. 2 replies.

Sort Posts:

  • Save a Form using Ctrl + S????

    12-05-2007, 10:33 PM
    • Member
      26 point Member
    • tbraga
    • Member since 10-17-2007, 3:18 AM
    • Posts 134

    Hi Guys,

    Was just thinking about this and couldn't find anything on the net about it.  Can you use keywords such as Ctrl S to save an ASP.net 2.0 form or other keywords? 

    Just point me in the right direction...if possible of course
    Thanks in advance!
    Tim

    Filed under: , ,
  • Re: Save a Form using Ctrl + S????

    12-05-2007, 11:30 PM
    Answer
    • Member
      117 point Member
    • mattyg21
    • Member since 01-29-2007, 3:51 AM
    • Posts 29

     I once tried something similar (can't remember what - but it was a combination used by the browser for another default action) and was unsuccessful. My intuition is that since the browser itself uses Ctrl + S, that it can't be done because the browser captures that key pattern. However, using some Javascript, it is possible as long as the key combination isn't utilized by the browser (at least that is my thought).

    Mathew
  • Re: Save a Form using Ctrl + S????

    12-06-2007, 1:00 AM
    Answer
    • Contributor
      4,221 point Contributor
    • moredotnet
    • Member since 11-24-2006, 7:07 AM
    • Millenium City
    • Posts 781

    You need to handle the keyup & keydown events using javascript. And from the javascript function, you may call your server side functions to follow the instructions of the Save functionality u have wriiten in code-behind.

    Vishal Khanna



    ASP.NET|C#|AJAX|SQL|Design Patterns|Interview FAQs
Page 1 of 1 (3 items)