Luca
Do you need to realize this in JavaScrip or in server code?
For Server code it will be something like this:
this.textBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(CheckKeys);
private void CheckKeys(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
if (e.KeyChar == (char)13)
{
//Pressed
}
}
But for JavaScript it will be something like this:
function enterKeyHandler(eventRef)
{
var keyCodeEntered = (eventRef.which) ? eventRef.which : (eventRef.keyCode) ? eventRef.keyCode : -1;
if ( keyCodeEntered == -1 )
keyCodeEntered = (event.which) ? event.which : (window.event.keyCode) ? window.event.keyCode : -1;
if ( keyCodeEntered == 13 )
{
Enter key detected');
}
}
Sergey