In winfrom applications i can have
textbox1.keydown
event, but i want to achieve same thing in webform (asp.net), so how can i do that? I need
In web application there are something you do in the client and some in the server.
I don't now what you what achieve, but i think that in most cases rise the keydown event will be in the client.
SO, there is a great library called JQUERY (javascript) that helps you do this kind of staff.
see the documentation of KEYDOWN
I wrote an example for you
HTML Code
JQUERY (javascript) Code
$(document).ready(function() {
$("#txtBox").keydown(function() {
$.ajax({
url: "URLTOTHEFUNCTIONINTHESERVER",
type: 'GET',
cache: false
}).done(function( html ) {
alert(html);
});
});
});
OK to explain the code