Ver Mensaje Individual
  #2 (permalink)  
Antiguo 03/05/2011, 14:55
Avatar de jaullo
jaullo
 
Fecha de Ingreso: abril-2009
Mensajes: 994
Antigüedad: 15 años
Puntos: 30
Respuesta: Problema con expresion regular

Hola,

Podrias hacer una validacion un poco mas sencilla, algo asi
<SCRIPT language=Javascript>
<!--
function isNumberKey(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57))
return true;

return false;
}
//-->
</SCRIPT>

<asp:TextBox ID="TextBox1" onkeypress="return isNumberKey(event)" runat="server"></asp:TextBox>

Saludos,
__________________
http://geekswithblogs.net/jaullo/Default.aspx
Si te he ayudado regalame Karma positivo!!!