Hi, I'm having some trouble using sessions in ASP.NET and hope that someone can help me with it.
On my webform, I have a login form (using form authenticatio) and below shows a snippet of the code for the page:
Session("LoginID") = Me.txtLoginID.Text
Response.Redirect(Request.ApplicationPath & "/Admin/ManageAcct.aspx")
As you can see, upon logging in, the user is directed to the ManageAcct.aspx page.
In ManageAcct.aspx page, i did a small test to check that the LoginID is stored. At the page load portion of ManageAcct.aspx, I added the line:
However, only the session id is printed and the LoginID is not stored at all!
I've also tried using session.add("LoginID","Testing") but also cannot get the LoginID out!
Can anyone tell me what's wrong? Please help