Hi,
I have created a web application with 5 forms using asp.net & vb.net.
The system got more than 250 web clients.
My problem is when the second user logs in to the web system, the second user overrides first user's details.
I want to get the User_ID, username, user ID and the selected branch name from the Login page and want to display those information on text boxes in other 5 pages.
So in other pages I want to use user id to extract information from mySQL tables.
This is my code.
Login.aspx.vb (First Form)
Protected Sub bttnLogin_Click(sender As Object, e As ImageClickEventArgs) Handles bttnLogin.Click
Session("UserName") = Server.HtmlEncode(txtUserName.Text)
Response.Redirect("~/default.aspx";, True)
End Sub
2nd form
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
lblDetails.Text = Session("UserName")
End Sub
But at the moment when two or more users logs to the system it's showing the correct usernames on "lblDetails.Text" but when u refresh the page it will show last logged in user's details.
Please help me.
Thanks