In this lesson, you will see how to maintain state in ASP.NET, including the various objects you can use to store information for your ASP.NET 2.0 applications. For Best View: watch the video in Full Screen Mode.
The scope of a variable determines where you can access that variable in your code. If a variable is in scope you can read or set it’s value. If it is out of scope you will not be able to access it.
There are three types of scope for variables in Visual Basic:
Global variables are in scope anywhere in your application. Module Scope
Module level variables are in scope anywhere within the module where they are declared. Local Scope
Local variables are only in scope within the procedure where they are declared.