473,385 Members | 1,867 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,385 software developers and data experts.

how can session variables take the user information

please tell me that if a session variable is not initialised either in global.asa or anywhere else and has to take user information, how can this be possible?
please explain me with code. I have same confusion with cookies also
Mar 18 '08 #1
5 1526
idsanjeev
241 100+
please tell me that if a session variable is not initialised either in global.asa or anywhere else and has to take user information, how can this be possible?
please explain me with code. I have same confusion with cookies also
Hi RamyaSrinath
if Session variable is not initialised any where then how can it work that not make any sance if you want to use session or cookies then you have to initialised first.Session and cookies both are store varibales and transfred value one to anohter asp page .Dr. B has been reply on your previous question.

The most important thing about the Session object is that you can store variables in it.

When the value is stored in a session variable it can be reached from ANY page in the ASP application:

Please Refer this link for more detail about session and cookies
cookies and session
Mar 18 '08 #2
Hi RamyaSrinath
if Session variable is not initialised any where then how can it work that not make any sance if you want to use session or cookies then you have to initialised first.Session and cookies both are store varibales and transfred value one to anohter asp page .Dr. B has been reply on your previous question.

The most important thing about the Session object is that you can store variables in it.

When the value is stored in a session variable it can be reached from ANY page in the ASP application:

Please Refer this link for more detail about session and cookies
cookies and session
ya that is ok. but how can it take user information?
Mar 18 '08 #3
idsanjeev
241 100+
ya that is ok. but how can it take user information?
Hi RamyaSrinath
When user login then you have to store and retrive user detail in session or cookies like

Expand|Select|Wrap|Line Numbers
  1. 'store username in session
  2. Session("username") =  Request.Form("username")
  3. 'store username in cookies
  4. Response.Cookies("username") = Request.Form("username")
  5. 'retrive username from session
  6. Response.write (Session("username"))
  7. 'retrive username from cookies
  8. Response.write (Request.cookies("username"))
  9.  
Mar 18 '08 #4
Hi RamyaSrinath
When user login then you have to store and retrive user detail in session or cookies like

Expand|Select|Wrap|Line Numbers
  1. 'store username in session
  2. Session("username") =  Request.Form("username")
  3. 'store username in cookies
  4. Response.Cookies("username") = Request.Form("username")
  5. 'retrive username from session
  6. Response.write (Session("username"))
  7. 'retrive username from cookies
  8. Response.write (Request.cookies("username"))
  9.  
thank you. actually there was some problem when I tried for that . but even then dat is the right one.
Mar 18 '08 #5
idsanjeev
241 100+
thank you. actually there was some problem when I tried for that . but even then dat is the right one.

Hi RamyaSrinath
What is the problems let us know some body can help you out
thanks
jha
Mar 19 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Pack Fan | last post by:
I've noticed that session variables will persist on Mac IE even after all browser windows have been closed. One must quit the program to clear the session variables. This presents a security risk...
5
by: Phil Grimpo | last post by:
I have a very odd situation here. I have an administration page, where based on a users permissions, a recordset is called from the SQL server which has a list of paths to "Module Menus". Each of...
14
by: Paul Yanzick | last post by:
Hello, I am trying to develop a book tracking application for my capstone in school, and am running into a problem. The application is an ASP.Net application written in C#. The first page you...
0
by: Michael | last post by:
I have a problem here that only seems to happen on the one new server that we are migrating our ASP.Net application to. The server is a Windows 2000 SP4 box. It initially had the .Net Framework...
2
by: Boban Dragojlovic | last post by:
I'm building a complex web-based reservations system. Gathering the user's data requires between 8 and 15 pages (depending on which options they are interested in). I use the "Session" object to...
3
by: Matt Mercer | last post by:
Hi all, I have read much about session variables and the pros and cons. I want to post my use and get opinions. When a user logs into my site various fields are pulled from a SQL user table....
8
by: Joe Abou Jaoude | last post by:
hi, I have a web app with forms authentication and a timeout session of 20 mins for security reasons. I recently added a feature that allows users (if they want to) to automatically log in...
14
by: Coleen | last post by:
Hi All :-) We have an APSX application using VB.net as the code behind, which uses one or two session variables per page. These Session variables are passed to the final page and calculations...
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...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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?
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
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
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...

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.