Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Mar 17, 2012 03:13 PM|LINK
I don't believe it's loosing the Session variables. The problem is your local variables such as UID are not persisetent. Every time you create a postback to any part of the page (not necessarily clicking on a button in the user control) your UID variable
is reset. The simples thing to do is simply make UID a property so that every time you access it, it returns the session variable.
protected string UID
if(Session["uid"] != null)
If you were truly loosing the session variables then you would be getting errors every time you tried to access Session["uid"] because if it was lost, the value would be null and any use of it would have thrown an object reference not found