i am new to this. i have 4 pages. login.aspx, account.aspx, settings.aspx and fliers.aspx. its all programmed in vb.net with sql server backend. on my firstr page, login.aspx i have this code in the .vb page -
Dim SQL As String = "SELECT * FROM table1 WHERE email='" + Me.txtUserName.Text + "' AND password='" + Me.txtPassword.Text + "' "
ExecuteNonQuery(SQL)
SqlCmd = New SqlCommand(SQL, SqlCnn)
SqlDR = SqlCmd.ExecuteReader
If SqlDR.HasRows Then
Do While SqlDR.Read()
Label1.Text = "successfully logged in"
Dim webUser As New webUser(SqlDR("email"), Session.Item("sqlcnn"))
Session.Item("webUser") = webUser
isValidUser = True
Loop
Else
Label1.Text = "Failed to login"
End If
as u can see it takes session.item("webuser") as email. this is fine on this page. on the next page that is account.aspx, it needs to replace email with the ID of the user who las logged in and in the settings.aspx page, it needs to replace the id of user with the profile id of that user. All these tables r in backend and have data, but the problem is my lack of knowledge. How do i make the session have different variables in it.