I am trying to persist an instance of my class between asp pages and cannot get it to work consistently. I have one class that implements iEnumerator, that works fine. I have another class that does not implement IEnumerator, I can store the object in Session. When I retrieve it from Session in a different page it behaves as if it's never been created before, I always have to create a new one
I'm thinking it has to do with if a class creates a new class (such as IEnumerator) 4 1597
Hi,
can you post the code for your problematic class (simplified will do if it
is long one)
--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist http://blogs.aspadvice.com/joteke
"Anthony Reynolds" <an*******@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com... I am trying to persist an instance of my class between asp pages and
cannot get it to work consistently. I have one class that implements
iEnumerator, that works fine. I have another class that does not implement
IEnumerator, I can store the object in Session. When I retrieve it from
Session in a different page it behaves as if it's never been created before,
I always have to create a new one. I'm thinking it has to do with if a class creates a new class (such as
IEnumerator)?
Hi,
can you post the code for your problematic class (simplified will do if it
is long one)
--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist http://blogs.aspadvice.com/joteke
"Anthony Reynolds" <an*******@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com... I am trying to persist an instance of my class between asp pages and
cannot get it to work consistently. I have one class that implements
iEnumerator, that works fine. I have another class that does not implement
IEnumerator, I can store the object in Session. When I retrieve it from
Session in a different page it behaves as if it's never been created before,
I always have to create a new one. I'm thinking it has to do with if a class creates a new class (such as
IEnumerator)?
Double check your index names both in global.asax and in the pages to
make sure they match. This happened to me when I had mispelled one of
them. They have be EXACTLY the same.
"Anthony Reynolds" <an*******@discussions.microsoft.com> wrote in message news:<30**********************************@microso ft.com>... I am trying to persist an instance of my class between asp pages and
cannot get it to work consistently. I have one class that implements
iEnumerator, that works fine. I have another class that does not
implement IEnumerator, I can store the object in Session. When I
retrieve it from Session in a different page it behaves as if it's
never been created before, I always have to create a new one. I'm thinking it has to do with if a class creates a new class (such as IEnumerator)?
Double check your index names both in global.asax and in the pages to
make sure they match. This happened to me when I had mispelled one of
them. They have be EXACTLY the same.
"Anthony Reynolds" <an*******@discussions.microsoft.com> wrote in message news:<30**********************************@microso ft.com>... I am trying to persist an instance of my class between asp pages and
cannot get it to work consistently. I have one class that implements
iEnumerator, that works fine. I have another class that does not
implement IEnumerator, I can store the object in Session. When I
retrieve it from Session in a different page it behaves as if it's
never been created before, I always have to create a new one. I'm thinking it has to do with if a class creates a new class (such as IEnumerator)? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: mjkahn |
last post by:
I've read (and read!) that you shouldn't store objects in Session variables.
I've read these reasons:
- The object takes up memory that may not be freed until the session times
out. Better to...
|
by: Sandra |
last post by:
I am using a VB6 COM object with an asp.net project. I am storing the
COM object in a session variable but am having a problem accessing the
COM object from the session variable.
I am getting...
|
by: jakk |
last post by:
Below is the exception that Iam getting. It says that the DataView that
Iam storing in the session is not Serializable. BUt works fine if I
store in the inproc session and fails if I switch to...
|
by: Curt tabor |
last post by:
Hi,
I have several pages in my app that all use the same
oleDBConnection(s). When this connection gets created, I store it as a
Session variable so that other pages can access it w/o having...
|
by: Mark Rae |
last post by:
Hi,
This relates to the previous thread "Disappearing Sessions", but is a bit
more generic so I thought I'd start a new thread. This one relates to the
storing of objects in Session once only to...
|
by: david |
last post by:
I have a class with some business-logic and with every roundtrip, I need
an instance of this class, so I have to create it, every time again.
That doesn't seem very efficient. I thought it would...
|
by: Mythran |
last post by:
We followed an example found on MSDN to create an encrypted
FormsAuthenticationTicket and storing the ticket in a cookie. Is this the
"correct" way to store the authentication ticket? We are...
|
by: RSH |
last post by:
Hi,
I have a situation where I have created an object that contains
fields,properties and functions. After creating the object I attempted to
assign it to a session variable so i could retrieve...
|
by: =?Utf-8?B?YmFzdWxhc3o=?= |
last post by:
Hi;
I want to store a datatable (or an arraylist) as a session variable but when
I try;
Session = al_RecNo;
I get an error that;
"Cannot implicitly convert type...
|
by: J055 |
last post by:
Hi
I have the following code. I upload an XML file using the FileUpload object,
store the stream in a session so the user gets the chance to confirm some
options then pass the stream from the...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |