HighTechTalks DotNet Forums  

equivalent of a Session variable in Windows Forms?

VB.net microsoft.public.dotnet.languages.vb


Discuss equivalent of a Session variable in Windows Forms? in the VB.net forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Tarren
 
Posts: n/a

Default equivalent of a Session variable in Windows Forms? - 05-01-2004 , 11:17 PM






Hi:

In Visual Basic is there the equivalent of a Session variable where I can
store variables in memory while the executable is running? I have been
coding ASP .NET for some time, but am new to Windows forms.

TIA
- Tarren



Reply With Quote
  #2  
Old   
CT
 
Posts: n/a

Default Re: equivalent of a Session variable in Windows Forms? - 05-02-2004 , 12:39 AM






Well, since the Session varibales in ASP(.NET) are session specific, all you
have to in Windows Forms is to create a variable that's public and
global/shared to your entire application.

--
Carsten Thomsen
Enterprise Development with VS .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
"Tarren" <noemailplease@thankyou> wrote

Quote:
Hi:

In Visual Basic is there the equivalent of a Session variable where I can
store variables in memory while the executable is running? I have been
coding ASP .NET for some time, but am new to Windows forms.

TIA
- Tarren





Reply With Quote
  #3  
Old   
Cor Ligthert
 
Posts: n/a

Default Re: equivalent of a Session variable in Windows Forms? - 05-02-2004 , 01:25 AM



Hi Tarren,

You do not need a Session in a window forms program.

Both, the aspnet application and the windowforms application, belong to the
client which it is using.

However that is direct the big difference, that is with the webapplication
the aspnet user and with the windowapplication the client himself. (The
session belongs to the webclient).

That implicate that a shared variable or object belongs with a webpage to
all users and with a windowform to the specific client.

Therefore using a shared object/variable in a webpage needs a special
threathment. In a windowform application there is absolute no need for that,
and that implicate as well that there is no need to use the session in the
windowsform application. You can use shared variable/objects.

If this is not clear or how to make shared varibables/objects, ask again?

Cor



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.