|
-
Mar 25th, 2004, 09:27 AM
#1
Thread Starter
Addicted Member
session variables
Guys,
I want some help regarding maintaining session variables. I am writing Asp.net using C#.
Once the user logs in to the system using his login and password
I want to store his settings (line fullname, email id and other
privileges) in session variables so that I can access them
throwout the application.
How do I go about this?
Last edited by Venkrishna; Mar 25th, 2004 at 10:22 AM.
there r no alternatives 4 hardwork.
-
Mar 25th, 2004, 10:55 AM
#2
After a successful login you can assign items to session as such
VB Code:
Session("FullName") = strFullName;
'or
Session("FullName") = txtName.text; ' using a textbox
Session("Email") = strEmail;
then to retrieve their values at any point...
VB Code:
txtName.text = Session("FullName");
-
Mar 26th, 2004, 04:26 AM
#3
Frenzied Member
In C# it is in the format:
Code:
Session["FullName"] = strFullName;
DJ
-
Mar 26th, 2004, 05:22 AM
#4
Thread Starter
Addicted Member
there r no alternatives 4 hardwork.
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
|