|
-
Aug 19th, 2000, 09:36 AM
#1
Thread Starter
Hyperactive Member
I don't really understand sessions. Someone please help with the basic information regarding them. Thanks
Code:
<%
Dim strMydata
...
strMydata = "this is my data"
...
session("mydata") = strMydata
%>
...
<% session("mydata") %>
why won't this code write "this is my data" on my screen? it's blank.
If you think education is expensive, try ignorance.
-
Aug 21st, 2000, 11:48 AM
#2
Hyperactive Member
The session object is used as a means to store information. This is necessary because HTTP is stateless. As an example, if you have a variable on one page and try to pass it to the next page, the information would be lost; unless you pass it in the query string, hidden fields etc...
The session object is a way to maintain and store information for the duration of the end user's "session".
There are many pro's and cons (mostly cons) about using session variables. The biggest, is that the each session variable is stored in the webservers memory. You can imagine the webserver's lack of performance, if you have many simultaneous users at the same time. Also, session variables are essentially, cookies; so if the end user has cookies disabled, you're in trouble.
-
Aug 22nd, 2000, 11:57 PM
#3
Lively Member
There are alternatives to session variables. On my site we pass most everything through hidden text fields, and there is always the query string
here are a couple of articles about sessions
http://www.4guysfromrolla.com/webtech/041600-2.shtml
http://www.4guysfromrolla.com/webtech/041399-1.shtml
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|