come mai quando premo il pulsante ke kiama questa funzione (<asp:Button id="btnSubmit" runat="server" text="entra" class="sub" onServerClick="Login" />) mi refresha la pagina e basta???codice:Sub Login() Dim Con As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; " _ + "Data Source=c:\\hosting\\noidellac.it\\wwwroot\\mdb-database\\regarray.mdb") Dim sqlString = "SELECT * FROM utenti WHERE password ='" & txtPass.Text & "', username='" & txtId.Text & "'" Dim myCommand As New OleDbCommand(sqlString, Con) Dim objReader As oleDbDataReader Con.Open() objReader = myCommand.ExecuteReader() If Not objReader.Read() Then Response.Redirect("http://www.noidellac.it/compiti/default.aspx?error=1") Else Session.Item("login") = 1 Session.Item("userID") = txtId.Text Response.Redirect("http://www.noidellac.it/compiti/index2.aspx") End If objReader.Close() Con.Close() End Sub

Rispondi quotando
