Link to home
Start Free TrialLog in
Avatar of Agent909
Agent909

asked on

How do I set a global variable in VB.NET

I need to set a variable that will be available throughout the application.  Is there any way to do this in VB.NET?  I want to keep track of the user that's logged in.

Thank you
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

you can create a public variable into a Module. It will be globally available .
ASKER CERTIFIED SOLUTION
Avatar of x77
x77
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of swapneel_d14
swapneel_d14

Declare session variable
Or you can have application variable set at global.asax
Avatar of Agent909

ASKER

You helped me with both situations:  in a Module or in a Class.  Thank you!