Réponse acceptée !
Imports System.Web.Security
Private Sub butSignOn_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles butSignOn.Click
' Identifie username/password depuis <credentials>.
If FormsAuthentication.Authenticate( _
txtUserName.Text, txtPassword.Text) _
Then
' Si trouvé, Afficher la page d'accueil de l'application.
FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, True)
Else
' sinon, effacer le contenu de la textbox password.
txtPassword.Text = ""
' si 3 essais, afficher la page "Access Denied".
If CInt(ViewState("Tries")) > 1 Then Response.Redirect("Denied.htm") Else
' sinon, on incrémente le nombre d'essais.
ViewState("Tries") = CInt(ViewState("Tries")) + 1 End If
End If
End Sub
merci a vous j'ai trouve la reponse