Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. adding my own event to built in controls

adding my own event to built in controls

Scheduled Pinned Locked Moved ASP.NET
questionsysadmintutorial
4 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DotNet_Newbie
    wrote on last edited by
    #1

    Hello all, Another quick question, I was wondering if it is possible to define my own events for a server control (built in controls), and define their event handlers. For example if I have a text box, how can I define and event and its handler for the text box that gets raised every time a character gets add or deleted from the text box, something like "onkeypress" but not from the client side, so I can catch the event and handle it on the server. Thanks all,

    M 1 Reply Last reply
    0
    • D DotNet_Newbie

      Hello all, Another quick question, I was wondering if it is possible to define my own events for a server control (built in controls), and define their event handlers. For example if I have a text box, how can I define and event and its handler for the text box that gets raised every time a character gets add or deleted from the text box, something like "onkeypress" but not from the client side, so I can catch the event and handle it on the server. Thanks all,

      M Offline
      M Offline
      Marc Clifton
      wrote on last edited by
      #2

      I believe that is truly impossible to do on the server side, unless you hook up something on the client side that causes a postback event (is that the right term?) to notify the server. And I can only imagine how slow that would be, for every every character typed. I think you'll have to write some JavaScript on the client side to do whatever it is you need done. Marc Latest AAL Article My blog Join my forum!

      D 1 Reply Last reply
      0
      • M Marc Clifton

        I believe that is truly impossible to do on the server side, unless you hook up something on the client side that causes a postback event (is that the right term?) to notify the server. And I can only imagine how slow that would be, for every every character typed. I think you'll have to write some JavaScript on the client side to do whatever it is you need done. Marc Latest AAL Article My blog Join my forum!

        D Offline
        D Offline
        DotNet_Newbie
        wrote on last edited by
        #3

        Thank you for your response, Well, I see what you mean, what drove me to this solution is: I want to update a specific server control each time a character changes in the text box. so if there is a way to do that from within the client side Java script handling the "onkeypress" That would be great. The control I'm trying to update is a datagrid Thank you in advance for your help

        M 1 Reply Last reply
        0
        • D DotNet_Newbie

          Thank you for your response, Well, I see what you mean, what drove me to this solution is: I want to update a specific server control each time a character changes in the text box. so if there is a way to do that from within the client side Java script handling the "onkeypress" That would be great. The control I'm trying to update is a datagrid Thank you in advance for your help

          M Offline
          M Offline
          Marc Clifton
          wrote on last edited by
          #4

          I believe you can update specific cells of a DataGrid on the client side. I really don't know how though, because I've never needed to do it (yet!). I remember coming across an example somewhere, but I can't recall where! Sorry! Marc Latest AAL Article My blog Join my forum!

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups