
28/06/2004, 03:29
|
 | | | Fecha de Ingreso: mayo-2004 Ubicación: Cádiz City
Mensajes: 232
Antigüedad: 20 años, 9 meses Puntos: 1 | |
Auto-Solucionado.
En el HTML:
Código:
<SCRIPT LANGUAGE="javascript">
function testEnterKey(buttonToClick){
if (event.keyCode == 13){
event.cancelBubble = true;
event.returnValue = false;
Form1[buttonToClick].click();
}
}
</SCRIPT>
En el CodeBehind:
Código:
textBox1.Attributes.Add("OnKeyPress", "testEnterKey('Button1');")
textBox2.Attributes.Add("OnKeyPress", "testEnterKey('Button2');")
Y listo... Saludos!!!
__________________ Tantas horas delante de una pantalla servirá para algo....
[Phoncadiz; mínimo 8 h. al día con el PC] :stress: |