Ver Mensaje Individual
  #6 (permalink)  
Antiguo 05/05/2008, 09:24
roger1187
 
Fecha de Ingreso: marzo-2008
Mensajes: 286
Antigüedad: 17 años, 1 mes
Puntos: 1
Re: problema con el login

Cita:
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
<%@ Import Namespace = "System.Data"%>
<%@ Import Namespace = "System.Data.SqlClient"%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<script runat="server">

sub Evaluar(obj as object, e as eventargs)

dim conexionesglo as new SqlConnection()
conexionesglo.connectionString=Application("conect a")
Dim cmd as New SqlCommand("select * from Usuarios where " & "UsuarioRegistro='" & txtUsuario.Text & "'",conexionesglo)
dim dr as SqlDataReader
conexionesglo.Open()
dr=cmd.ExecuteReader(CommandBehavior.SingleRow)
if dr.Read then
if dr("Clave")= txtClave.Text then
dr.close()
conexionesglo.close()
Response.Redirect("mantenimientoproveedores.aspx")
else
lblMensaje.Text="La contraseña no es la correcta"
End if
Else
lblMensaje.Text="El Usuario no existe"
end if
end sub

sub LimparTextBox(obj As Object, e As eventargs)
txtUsuario.text=""
txtClave.text=""
End sub



</script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>
<body>
<form action="" method="post" name="form1" id="form1" runat="server">
<p>
<asp:Label ID="lblUsuario" Text="Usuario" runat="server" />
<asp:TextBox ID="txtUsuario" runat="server" />
<br />
<asp:Label ID="lblClave" runat="server" Text='contraseña' />
<asp:TextBox ID="txtClave" TextMode="Password" runat="server" />
<br />
<br />
<asp:Label ID="lblMensaje" runat="server" />
</p>
<p>
<asp:Button ID="btnAceptar" Text="Aceptar" runat="server" />
<asp:Button ID="btLimpiar" Text="Limpiar" runat="server" />
<br />
</p>
</form>
</body>
</html>
el codigo esta asi..pero no me deja llevar a la sgte pagina