473,406 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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 4910
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
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
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
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
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
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
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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
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...
0
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.