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

edit sessions in ASP.NET. How?

hi all,
i have a question regarding the sessions or so called memory cookies
in ASP.NET. Is there a way all the current sessions to be viewed and
edited somehow? For example: I have opened 5 different aspx web
applications, which have created 5 different sessions. Now, I want to
be able to view the content of all of their sessions and to edit them.
An example of source code or hint for a tool, which does this is
really appreciated.

10x in advance
Paul
Nov 18 '05 #1
2 1012
Paul Oak <ge******@hotmail.com> typed:
hi all,
i have a question regarding the sessions or so called memory cookies
in ASP.NET. Is there a way all the current sessions to be viewed and
edited somehow? For example: I have opened 5 different aspx web
applications, which have created 5 different sessions. Now, I want to
be able to view the content of all of their sessions and to edit them.
An example of source code or hint for a tool, which does this is
really appreciated.


This sample show you how interact with HttpSession object:

for(int i = 0; i < Session.Keys.Count; i++)
{
string keyName = Session.Keys[i];
object keyValue = Session[i];
}

To set a value in a Session variable:

Session["VariableName"] = value;

To read a Session variable of int type:

int i = Int32.Parse(Session["VariableName"]

....and so on for others types.

HTH

--
Davide Vernole
MVP ASP/ASP.NET
Microsoft Certified Solution Developer
Nov 18 '05 #2
'how to display all items in a user's session:

Dim keys As
System.Collections.Specialized.NameObjectCollectio nBase.KeysCollection =
Session.Keys
Dim key As String
Dim sSessions As String

For Each key In keys
sSessions &= key.ToString & " - " & Session(key).ToString & "<br>"
Next key

If sSessions.Length = 0 Then
lblSession.Text = "No Active Sessions"
Else
lblSession.Text = sSessions
End If

--
Joe Fallon


"Paul Oak" <ge******@hotmail.com> wrote in message
news:29**************************@posting.google.c om...
hi all,
i have a question regarding the sessions or so called memory cookies
in ASP.NET. Is there a way all the current sessions to be viewed and
edited somehow? For example: I have opened 5 different aspx web
applications, which have created 5 different sessions. Now, I want to
be able to view the content of all of their sessions and to edit them.
An example of source code or hint for a tool, which does this is
really appreciated.

10x in advance
Paul

Nov 18 '05 #3

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

Similar topics

2
by: The Plankmeister | last post by:
Hi... I'm trying my hardest to understand fully how sessions work and how best to use them. However, all I can find is information that doesn't tell me anything other than that sessions store...
13
by: jing_li | last post by:
Hi, you all, I am a newbee for php and I need your help. One of my coworker and I are both developing a webpage for our project using php. We have a copy of the same files in different location...
3
by: Maxime Ducharme | last post by:
Hi group We have a problem with sessions in one of our sites. Sessions are used to store login info & some other infos (no objects are stored in sessions). We are using Windows 2000 Server...
3
by: Will Woodhull | last post by:
Hi, I'm new here-- I've been reading the group for a couple of days. Nice group; I like the way n00b33 questions are handled. I've been using a Javascript routine in index.html to determine a...
10
by: Jim | last post by:
Hi, Let me explain how I'd generally do things. For a page where the user edits data, I'd generally call it something like editfred.php (for example), the page which updates the data would be...
2
by: Steve Franks | last post by:
According to the docs you tell ASP.NET to use cookieless sessions by setting a value in the config.web file. However, what if I wanted to determine at run time whether or not I wanted to use...
12
by: D. Shane Fowlkes | last post by:
This is a repost (pasted below). Since my original post, I've double checked the system clock and set all IIS Session Timeout values to 10 minutes. Still ...the problem occurs. I've also...
6
by: Daniel Walzenbach | last post by:
Hi, I have a web application which sometimes throws an “out of memory” exception. To get an idea what happens I traced some values using performance monitor and got the following values (for...
13
Frinavale
by: Frinavale | last post by:
One of the most fundamental topics in web design is understanding how to pass information collected on one web page to another web page. There are many different ways you could do this: Cookies,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
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
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 projectplanning, 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.