In ASP.NET 2.0, create a public class in App_code folder and create punblic static/shared variable.
By this, you will get global variable
To make a variable global (rather than public) you would add it to a class that is a singleton. A singleton helps to guarantee that there is only one instance of that class available at runtime.
Declare the variable as public.
Another way is create a public class, define all the variables. You can globally access these variables.