This code don't save username and password register by the user
I use the session to store the username ,,so when i click on change password button the system know the password for who...??!!
plz answer as soon as possible
What I have tried:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim con As New SqlConnection
Dim cmd As New SqlCommand("log1")
Dim ADD As New SqlDataAdapter
cmd.CommandType = CommandType.StoredProcedure
Dim ds As New DataSet
Dim dt As New DataTable
Dim str As String
Dim up As Byte
con.ConnectionString = "Server=.;Database=log;User Id=sa; Password=123;"
cmd.Connection = con
ADD.SelectCommand = cmd
cmd.Parameters.Add("@Username", SqlDbType.VarChar)
cmd.Parameters("@Username").Value = TxtUser.Text
cmd.Parameters.Add("@Password1", SqlDbType.VarChar)
cmd.Parameters("@Password1").Value = TxtPass.Text
con.Open()
ADD.Fill(ds, "Tabel")
'Server.Transfer("login.aspx", True)
con.Close()
Session("loaddata") = ds.Tables("Tabel")
If ds.Tables("Tabel").Rows(0)("x") = 0 Then
MsgBox("True")
'Server.Transfer("login.aspx", True)
'Response.Redirect("login.aspx")
Else
MsgBox("False")
End If
End Sub