adding my own event to built in controls
-
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,
-
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,
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!
-
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!
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
-
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
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!