Professional Documents
Culture Documents
<title>Mostrar Mensajes</title>
<script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.js"
type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jqueryui.min.js" type="text/javascript"></script>
<link rel="stylesheet"
href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.3/themes/base/jqueryui.css" type="text/css" media="all" />
<script type="text/javascript">
function validarN(e) {
tecla = (document.all) ? e.keyCode : e.which;
if (tecla == 8) return true;
patron = /
[qwertyuiopasdfghjklzxcvbnmQWERTYUIOPLKJHGFDSAZXCVBNM]/;
te = String.fromCharCode(tecla);
if (patron.test(te)) {
alert('SOLO SE ACEPTAN NMEROS');
return false;
}
}
function validarN(e) {
tecla = (document.all) ? e.keyCode : e.which;
if (tecla == 8) return true;
patron = /
[qwertyuiopasdfghjklzxcvbnmQWERTYUIOPLKJHGFDSAZXCVBNM]/;
te = String.fromCharCode(tecla);
if (patron.test(te)) {
alert('SOLO SE ACEPTAN NMEROS');
return false;
}
}
function validarL(e) {
tecla = (document.all) ? e.keyCode : e.which;
if (tecla == 8) return true;
patron = /[0123456789]/;
te = String.fromCharCode(tecla);
if (patron.test(te)) {
alert('SOLO SE ACEPTAN LETRAS');
return false;
}
}
</script>
//llamamos al script
onkeypress="return validar1(event)"
//PAGINAMOS GRID
AllowPaging="True"
onpageindexchanging="gvDatos_PageIndexChanging" PageSize="5"
//CODIGO EN CLASE DEL FORMULARIO
protected void gvMenu_PageIndexChanging(object sender,
GridViewPageEventArgs e)
{
gvMenu.PageIndex = e.NewPageIndex;
string[] menu = { "1", "abc" };
cargarMenu(menu);
}