Foros del Web » Programando para Internet » ASPX (.net) »

problemas con autenticacion

Estas en el tema de problemas con autenticacion en el foro de ASPX (.net) en Foros del Web. Estoy havien una pagina de autenticacion y el codigo es el siguiente: Partial Class _login Inherits System.Web.UI.Page Private Sub btnlogin_Click(ByVal sender As System.Object, ByVal e ...
  #1 (permalink)  
Antiguo 19/12/2005, 18:50
Usuario baneado!
 
Fecha de Ingreso: julio-2005
Mensajes: 198
Antigüedad: 18 años, 9 meses
Puntos: 0
problemas con autenticacion

Estoy havien una pagina de autenticacion
y el codigo es el siguiente:
Partial Class _login
Inherits System.Web.UI.Page
Private Sub btnlogin_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) handles btnlogin.click
'Validación con usuarios en el WebConfig.
If IsValid Then
If System.Web.Security.FormsAuthentication.Authentica te(txtusuario.Text,
txtPassword.Text) Then
System.Web.Security.FormsAuthentication.RedirectFr omLoginPage(txtpassword.Text,
chkPassword.Checked)
Else
LabelAviso.Visible = True
LabelAviso.Text = "Nombre de usuario y/o contraseña no validos."
End If
End If
End Sub
End Class

Y al prbarlo me aparecen los siguientes errores

Línea 2: Partial Class _login
Línea 3: Inherits System.Web.UI.Page
Línea 4: Private Sub btnlogin_Click(ByVal sender As System.Object, ByVal e As
Línea 5: System.EventArgs) handles btnlogin.click
Línea 6: 'Validación con usuarios en el WebConfig.

c:\inetpub\wwwroot\d-f\Default.aspx.vb(4) : error BC30182: Se esperaba un tipo.

Private Sub btnlogin_Click(ByVal sender As System.Object, ByVal e As
~
c:\inetpub\wwwroot\d-f\Default.aspx.vb(5) : error BC30691: 'EventArgs' es un tipo en 'System' y no se puede usar como expresión.

System.EventArgs) handles btnlogin.click
~~~~~~~~~~~~~~~~
c:\inetpub\wwwroot\d-f\Default.aspx.vb(5) : error BC30800: Los argumentos de método se deben incluir entre paréntesis.

System.EventArgs) handles btnlogin.click
~
c:\inetpub\wwwroot\d-f\Default.aspx.vb(5) : error BC30205: Se esperaba el fin de instrucción.

System.EventArgs) handles btnlogin.click
~~~~~~~~~~~~~~~~~~~~~~~~
c:\inetpub\wwwroot\d-f\Default.aspx.vb(8) : error BC30451: No se ha declarado el nombre 'txtusuario'.

If System.Web.Security.FormsAuthentication.Authentica te(txtusuario.Text,
~~~~~~~~~~
c:\inetpub\wwwroot\d-f\Default.aspx.vb(8) : error BC30201: Se esperaba una expresión.

If System.Web.Security.FormsAuthentication.Authentica te(txtusuario.Text,
~
c:\inetpub\wwwroot\d-f\Default.aspx.vb(9) : error BC30451: No se ha declarado el nombre 'txtPassword'.

txtPassword.Text) Then
~~~~~~~~~~~
c:\inetpub\wwwroot\d-f\Default.aspx.vb(9) : error BC30800: Los argumentos de método se deben incluir entre paréntesis.

txtPassword.Text) Then
~
c:\inetpub\wwwroot\d-f\Default.aspx.vb(9) : error BC30205: Se esperaba el fin de instrucción.

txtPassword.Text) Then
~~~~~~
c:\inetpub\wwwroot\d-f\Default.aspx.vb(10) : error BC30451: No se ha declarado el nombre 'txtpassword'.

System.Web.Security.FormsAuthentication.RedirectFr omLoginPage(txtpassword.Text,
~~~~~~~~~~~
c:\inetpub\wwwroot\d-f\Default.aspx.vb(10) : error BC30201: Se esperaba una expresión.

System.Web.Security.FormsAuthentication.RedirectFr omLoginPage(txtpassword.Text,
~
c:\inetpub\wwwroot\d-f\Default.aspx.vb(11) : error BC30451: No se ha declarado el nombre 'chkPassword'.

chkPassword.Checked)
~~~~~~~~~~~
c:\inetpub\wwwroot\d-f\Default.aspx.vb(11) : error BC30800: Los argumentos de método se deben incluir entre paréntesis.

chkPassword.Checked)
~
c:\inetpub\wwwroot\d-f\Default.aspx.vb(11) : error BC30205: Se esperaba el fin de instrucción.

chkPassword.Checked)


Que ago
Por favor, agradesco sus ayudas
  #2 (permalink)  
Antiguo 19/12/2005, 18:54
Usuario baneado!
 
Fecha de Ingreso: julio-2005
Mensajes: 198
Antigüedad: 18 años, 9 meses
Puntos: 0
O si ahy otro codigo que me pueda servir por favor lo dejan

Por si algo utilizo Visual Web Developer 2005 Express Edition Beta 2
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 15:42.