Hi all,
I am a newbie in VB.Net and was kind of lost in programming using it compared to the old VB6.
In VB6 I was able to create, declare or assign values to global variables. But now, it seems that every variable should be included in some class (I'm not sure).
What I need to do is to have some global variables and use them to different web pages without using the classes. What I mean is I do not like to use this sample:
..then use that StringTest variable in other webforms..
.. something like that. Can somebody show me how to do it please? Thanks.
I am a newbie in VB.Net and was kind of lost in programming using it compared to the old VB6.
In VB6 I was able to create, declare or assign values to global variables. But now, it seems that every variable should be included in some class (I'm not sure).
What I need to do is to have some global variables and use them to different web pages without using the classes. What I mean is I do not like to use this sample:
Code:
Public Class FirstForm Public StringTest As String 'then assign some values to StringTest StringTest = "abc123" End Class
Code:
Dim SecondForm As New FirstForm Dim SecondString As String SecondString = SecondForm.StringTest