473,503 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

equivalent of a Session variable in Windows Forms?

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
Nov 20 '05 #1
3 4919
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
Nov 20 '05 #2
CT
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 in message
news:e0**************@TK2MSFTNGP12.phx.gbl...
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

Nov 20 '05 #3
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
Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
3104
by: Thomas Scheiderich | last post by:
I am trying to understand Session variables and ran into a question on how they work with data that is passed. I have an HTM file that calls an ASP file and sends the name either by GET or POST....
6
2365
by: Al Jones | last post by:
This is a repost form the vbscript newgroup - if this isn't the appropriate group would you point me toward one that is. Basically, I seem to be losing session data part way though preparing an...
1
2010
by: Scott Wickham | last post by:
I'm having a problem saving session information on one form and retrieving it on a subsequent form...for only one out of a number of users. Actually, I'm not absolutely certain it's a session...
3
7308
by: Michelle Stone | last post by:
hi al i have "variab1 = window.open ("a.aspx", "helloworld"); i do this inside a RegisterStartupScrict ("key", "<script language=javascript>******</script>"); where ***** is hte javascript...
0
1624
by: Nabani Silva | last post by:
Hi, hope someone could help I need to share session state (and contents) through differente web applications. I'm trying to get it done by using StateServer session state, below I paste code...
13
2787
by: Alexander Widera | last post by:
hi, who has seen the follow problem or could help please? i visit a page .... i read a sesssion-var . ... everythink works...... i visit the page again..... error ... the sessionvar is null .... i...
1
534
by: Tarren | last post by:
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...
0
997
by: cdani | last post by:
Hello. I have an applicattion with visual basic.net, which uses windows forms. How can I mantain a session in different calls to the same webservice? (which uses some database access). The goal...
4
5314
by: Bjorn Sagbakken | last post by:
In a web-application with login creds (user, pwd), these are checked against a user table on a SQL server. On a positive validation I have saved the userID, name, custno and role-settings in a...
3
4975
by: dihola | last post by:
Hi, I have a website running in IIS7 and it seems to be creating a new session for every request I make. The values I store in Session are lost with every request. This is the forms bit in my...
0
7202
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7332
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7462
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
382
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.