473,405 Members | 2,279 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,405 software developers and data experts.

Session Variables

What are session variables in a web page of ASPX (Visual Basic NET)?
Thanks.

Nov 28 '05 #1
5 2132
Hi,

Session variables allow you to pass data to another page in the
website or save data between post backs.

Ken
----------------
"juan" <ju**@discussions.microsoft.com> wrote in message
news:AF**********************************@microsof t.com...
What are session variables in a web page of ASPX (Visual Basic NET)?
Thanks.

Nov 28 '05 #2

when querying the first page of a asp.net application a session object is
created on the webserver , in this session object wich is availlable as long
as you are active on the website + 20 minutes you can store session
specific values .

You use this object normally for storing vallues that are logicly related
to a specific user
this could be a shopcart , a username , or anything else you can think of
( it is even possible to store complete objects in the session object )
regards

Michel Posseth [MCP]

"juan" <ju**@discussions.microsoft.com> wrote in message
news:AF**********************************@microsof t.com...
What are session variables in a web page of ASPX (Visual Basic NET)?
Thanks.

Nov 28 '05 #3
Michel,

You use this object normally for storing vallues that are logicly related
to a specific user

In my opinion is "normally" "only". For shared use you need to use a shared
class or the cache.

Cor
Nov 28 '05 #4

Well you could also use a database for the same purpose , and abbandon
session vars completely , this aproach is often used in webfarm scenario`s
where you can`t use session variabels at all or when coockies are not
allowed on the target machine .

And for a fact ,,,,, i was once consulted by a firm who stored there
database connection object in a session var ( and asked me why there server
run out of resources so quick )
:-)

but okay you are right in your statement that
In my opinion is "normally" "only". For shared use you need to use a shared
class or the cache.
regards

Michel
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:Oc**************@TK2MSFTNGP15.phx.gbl... Michel,

You use this object normally for storing vallues that are logicly
related to a specific user

In my opinion is "normally" "only". For shared use you need to use a
shared class or the cache.

Cor

Nov 28 '05 #5
I think I understand session variables a little so let me try to explain them:

Suppose you have an application that allows users to login to your website.
When a user logs in, the applications starts a new session for that user.
You can look up the user data like his name, address, etc. in a database and
store this in an instance of a class you have defined for user data. This
class instance can then be stored in a session variable as say "currentuser".
As the user moves from one of your application web pages to another, you can
determine his name, id, etc. from the session variable in any page of your
application.

There are also Application variables that are available to all your pages in
all the sessions.

Session variables are really easy and handy if you have an application with
different pages.

--
Dennis in Houston
"juan" wrote:
What are session variables in a web page of ASPX (Visual Basic NET)?
Thanks.

Nov 29 '05 #6

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

Similar topics

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...
6
by: Lina Manjarres | last post by:
Hello, I have a session variable in a login page. Then I go to a form page where I uses the ProfileID and the UserID. Then I go to a result page where I would like to use the UserID as a filter,...
4
by: PJ | last post by:
A particular page seems to be having issues with correctly setting Session variables. I am setting a couple of session variables on the Page_Unload event. While stepping through code, the...
31
by: Harry Simpson | last post by:
I've come from the old ASP camp where session variables were not used. When i started using ASP.NET in 2001, I started using them again because it was ok from what I'd read. I've been merrily...
10
by: tshad | last post by:
I have been using the default session state (InProc) and have found that I have been loosing my information after a period of time (normally 20 minutes). Is there anyway to find out how much...
3
by: Alan Wang | last post by:
Hi there, Once my application gets complicated and complicated. I found it's really hard to keep track of Session value I am using in my asp.net application. I am just wondering if anyone have...
3
by: Phillip N Rounds | last post by:
I'm writing a user control which has two states: Active & InActive. I additionally am required that there to be only one active control per page, and all logic has to be contained within the...
18
by: BillE | last post by:
When a user opens a new IE browser window using File-New-Window the integrity of an application which relies on session state is COMPLETELY undermined. Anyone who overlooks the fact that...
26
by: BillE | last post by:
Some ASP.NET applications use Session Variables extensively to maintain state. These should be re-written to use viewstate, hidden fields, querystring, etc. instead. This is because if a user...
12
by: MrHelpMe | last post by:
Hello again all, I've finished my whole application and now I don't like the whole session variables that I am using. I have a form, user fills in info clicks submit and using CDOSYSMail an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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,...

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.