A global variable is not a good idea for this, because that will be really global (i.e., visible to every page on any request) and one variable can only hold one value.
The thing you are looking for is Sessin. If you are on C# and I think you are, you can set the session like this:
and you can retrieve it like this:
int.TryParse(Session["us
which
This session is available to every page and every masterpage and every control. It is meant for this kind of storage and will be unique per user, but can be retrieved at any time.





by: davrob60Posted on 2009-04-24 at 13:10:28ID: 24228756
i would not use Master Pages for Global Variables.
but do you know you could store session state on SQL server???
http://support.mi crosoft.co m/kb/31760 4