Could you post the entire code of the page, aspx.vb along with the aspx ?
I also wonder if your class is not properly serializing. If it doesn't serialize properly it won't be stored in viewstate. However, ASP.NET compiler would most likely error when you attempt putting Session("user") = l.
This is what I would do, usein your login code, then in the postback, putVB Code:
Session.add("User","LOGGEDIN")
VB Code:
dim st as string = Session.Item("User")
Put a breakpoint on the line right after you grab the Session.Item("user"), and see if st = "LOGGEDIN". If it does, we know its not some weird web configuration problem.
We would then ascertain your class does not properly serialize to a string (XML).




Reply With Quote