Hello All,
I want to display all the name-value pairs of the session object....how can
I print them out? i.e., suppose once a user logs in I set a session variable
login time Session["logintime"] = "2pm" and Session["logouttime "]="10pm". So
how can I print these variables i.e., logintime and logouttime and their
values together?
In which namespace is the Session object...can I retrieve the name-value
pairs as collection?
Thanks for your help!! 3 1561
<%@ Page Language="VB" %>
<html>
<head>
</head>
<body>
<script language="VB" runat="server">
Sub Page_Load(Sende r As Object, E As EventArgs)
Dim Item as String
For Each Item In Session.Content s
Response.Write (Item & " = " & Session(Item))
Response.Write ("<br>")
Next
End Sub
</script>
</body>
</html>
Juan T. Llibre
ASP.NET MVP http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
=============== =======
"Diffident" <Di*******@disc ussions.microso ft.com> wrote in message
news:78******** *************** ***********@mic rosoft.com... Hello All,
I want to display all the name-value pairs of the session object....how can I print them out? i.e., suppose once a user logs in I set a session variable login time Session["logintime"] = "2pm" and Session["logouttime "]="10pm". So how can I print these variables i.e., logintime and logouttime and their values together?
In which namespace is the Session object...can I retrieve the name-value pairs as collection?
Thanks for your help!!
I was looking for an ASP.NET API.
"Juan T. Llibre" wrote: <%@ Page Language="VB" %> <html> <head> </head> <body> <script language="VB" runat="server"> Sub Page_Load(Sende r As Object, E As EventArgs) Dim Item as String For Each Item In Session.Content s Response.Write (Item & " = " & Session(Item)) Response.Write ("<br>") Next End Sub </script> </body> </html>
Juan T. Llibre ASP.NET MVP http://asp.net.do/foros/ Foros de ASP.NET en Español Ven, y hablemos de ASP.NET... =============== =======
"Diffident" <Di*******@disc ussions.microso ft.com> wrote in message news:78******** *************** ***********@mic rosoft.com... Hello All,
I want to display all the name-value pairs of the session object....how can I print them out? i.e., suppose once a user logs in I set a session variable login time Session["logintime"] = "2pm" and Session["logouttime "]="10pm". So how can I print these variables i.e., logintime and logouttime and their values together?
In which namespace is the Session object...can I retrieve the name-value pairs as collection?
Thanks for your help!!
heh, heh...
You should have said so.
The Session object is in the
System.Web.Sess ionState.HttpSe ssionState class : http://www.csharpfriends.com/quickst...tpSessionState
I don't think you can access the Session collections
for all users of an application unless you log the items
to a database, though.
If you find a way, please post the solution.
Juan T. Llibre
ASP.NET MVP http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
=============== =======
"Diffident" <Di*******@disc ussions.microso ft.com> wrote in message
news:93******** *************** ***********@mic rosoft.com... I was looking for an ASP.NET API.
"Juan T. Llibre" wrote: <%@ Page Language="VB" %> <html> <head> </head> <body> <script language="VB" runat="server"> Sub Page_Load(Sende r As Object, E As EventArgs) Dim Item as String For Each Item In Session.Content s Response.Write (Item & " = " & Session(Item)) Response.Write ("<br>") Next End Sub </script> </body> </html>
Juan T. Llibre ASP.NET MVP http://asp.net.do/foros/ Foros de ASP.NET en Español Ven, y hablemos de ASP.NET... =============== =======
"Diffident" <Di*******@disc ussions.microso ft.com> wrote in message news:78******** *************** ***********@mic rosoft.com... > Hello All, > > I want to display all the name-value pairs of the session object....how can > I print them out? i.e., suppose once a user logs in I set a session variable > login time Session["logintime"] = "2pm" and Session["logouttime "]="10pm". So > how can I print these variables i.e., logintime and logouttime and their > values together? > > In which namespace is the Session object...can I retrieve the name-value > pairs as collection? > > Thanks for your help!! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Gregory |
last post by:
Hello,
I've managed to build two web pages, one that can display images with
associated text data in a table, and one that can resize and display images
without the text. I'd like to resize the images as I go, without writing
them to disk on the server. Do I need to prepare all of the resized images
before I display the data from the select...
|
by: Waguih Boctor |
last post by:
Hi,
I have a number of ASP pages where some JPGs and GIFs are displaying in the
browser and some are not. I have included an excerpt from the HTML below. In
this example, the gif file at the bottom of the example is displaying (I
have others that don't), while the jpg file at the top isn't. Both files are
in the same folder (visible bith...
|
by: Les Juby |
last post by:
Can someone please help with a suggestion as to how I can keep the
formatting (carriage returns) that the user enters into a memo field
and then display that later.
I figured I might be able to use:
'replace carriage returns with BRs
comment=Replace(comment, chr(13), "<br>")
but obviously net.!
The <pre> tag doesn't sem to help either...
|
by: Alec |
last post by:
Newbie question.
I have a database for displaying the names of bed and breakfasts
searched for by the town they are in as below.
<?php
$result = @mysql_query ("SELECT name FROM site01_details WHERE
town='$townsearch' AND code='sleep'");
while ($row = mysql_fetch_array($result))
|
by: Mark ??;-\) |
last post by:
I would like to display a listing of files on a web page as follows:
If there is only one file: display the section name and then display the
current file.
If there is more than one file (for the first page): display the section
name, the current file and a few archive files.
If there is more than a page full (for each additional page):...
| |
by: Aladdin |
last post by:
I have an MS Access form on which I have a listbox listing tables in
that database. I want to be able to click on any of those tables and
view its contents on the same form using subforms or any grid control.
I tried many grid controls (DBGrid, DataGrid, MSFlexGrid), the ADO
Data Control and everything I can think of, with no success. Here...
|
by: pe3no |
last post by:
Hi,
First of all - sorry for my silly question and the horribly strange way
of using XML by me - I'm an XML n00b :) :) :)
I'm trying to write a short guide - putting everything in one file.xml
<guide_name>
<element name = "1-prerequisites">
1.1. download iso file
|
by: adamwolf1965 |
last post by:
On the page http://www.franklincar.org/index.html (which I did not
build), some Firefox users are reporting that the "Franklin Vintage
Photo Book" image towards the middle of the page (right below the
maroon "Please Note" text) is not displaying for them.
I've viewed the page in Firefox 2 on both Mac and PC but have been
unable to duplicate...
|
by: ColebyA |
last post by:
Hi
I am using ASP and HTML to process a form. The first form calls another page to process the data. When the page processes it redirects to a page confirming submission. I want to display the data entered by the user on the confirmation page.
Could someone shed any light on how to link the pages and do this. All I can find out about is...
|
by: suprodeep |
last post by:
have a page for admin(admin.aspx). This would enter product name, image, category name and and long description in a formatted manner. The prod name, image, category name can be inputted to database. However for long description i am using an html editor downloaded from net called cutesoft. Then i use server.htmlencode for entering the text...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |