TextBoxEvents

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Vajrala Narendra
    New Member
    • Jun 2007
    • 73

    TextBoxEvents

    Hi
    In asp.net how to retieve keypress, keydown, keyup events
    ThankYou
    Naren
  • kunal pawar
    Contributor
    • Oct 2007
    • 297

    #2
    do u want it for text box

    u can add attribute on pageload event

    textbox1.attrib ute.add("onKeyP ress","call your function")

    Comment

    • Ramchandar
      New Member
      • Dec 2007
      • 11

      #3
      Originally posted by Vajrala Narendra
      Hi
      In asp.net how to retieve keypress, keydown, keyup events
      ThankYou
      Naren
      You can also use client side javascript for achieving keypress events

      With regards,
      ram

      Comment

      • Vajrala Narendra
        New Member
        • Jun 2007
        • 73

        #4
        Originally posted by Ramchandar
        You can also use client side javascript for achieving keypress events

        With regards,
        ram
        can i have that coding part

        Comment

        • r035198x
          MVP
          • Sep 2006
          • 13225

          #5
          Originally posted by Vajrala Narendra
          can i have that coding part
          What would really help is that you get a tutorial about this and read it. If you then get stuck with the code you can post your code here and the experts will be able to help you.
          I just don't think that giving bolier-plate code is the best way of giving someone help.

          Comment

          • kunal pawar
            Contributor
            • Oct 2007
            • 297

            #6
            Originally posted by Vajrala Narendra
            can i have that coding part
            in Head tag
            <script language="javas cript" type="text/javascript">
            function keyPressHandler () {

            var kC = (window.event) ? // MSIE or Firefox?
            event.keyCode : e.keyCode;
            var Esc = (window.event) ?
            27 : e.DOM_VK_ESCAPE // MSIE : Firefox
            if(kC==Esc){Can celMe()}

            }
            </script>

            <textarea id='Textarea1' tabindex='1' onkeypress="jav ascript:keyPres sHandler();" name='casenote' >

            onpress escap key undo in text area

            Comment

            Working...