ha senso questo codice?
codice:dim id As String dim pass As String dim cont As Integer dim n As Integer Dim sql As String Dim check As Boolean usid = request("id") pass = request("pass") sql = "SELECT * FROM utenti" rs = cn.Execute(sql) check = 0 If (usid = "") or (pass = "") Then response.redirect "indexc.aspx?erroren=true" End If Do while NOT RS.EOF If usid = rs("id").Value Then If pass = rs("password").Value Then session("login") = 1 session("userID") = usid response.redirect "index2.aspx" check = 1 Else session("login") = 0 response.redirect "indexc.aspx?errorep=true" End If Else rs.MoveNext End If Loop If check = 0 Then response.redirect "indexc.aspx?erroreid=true" End If