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

class - save from page to page

How do I get a class to persist from page to page?
Feb 24 '06 #1
3 867
I take it you mean an object (an instance of a specific class).
You need to store it somewhere. If you are exclusively using Server.Transfer
for navigation (unlikely) you can store it in Context.Items, else you need
to persist it in the session (or the cache, but there are implications to
this).

If your sessionState isn't set InProc, the class will have to be
serializable.

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"G. Whiz" <df****@asdf.com> wrote in message
news:rP******************************@comcast.com. ..
How do I get a class to persist from page to page?

Feb 24 '06 #2
what does " class will have to be serializable."
Feb 24 '06 #3
Well, if you are using InProc sessions, then a simple reference to the class
on the heap is stored...works great.

If you are using StateServer or SQLServer as your session store, you can't
store heap memory, but rather need to be able to serialize the data. For
basic types, this is as simple as marking the Serializeable attribute on the
class. For more difficult classes, you need to serialize it yourself. If you
aren't using anything but InProc, don't worrya bout it.

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"G. Whiz" <df****@asdf.com> wrote in message
news:II********************@comcast.com...
what does " class will have to be serializable."

Feb 24 '06 #4

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

Similar topics

15
by: | last post by:
Hi, I want to do things this way: I have a bunch of stuff that I want to keep track of while a user is connected to the site. Maybe 50 little peices of information. So I know I can make 50...
8
by: Tammy B. | last post by:
Hiya - Big puzzler for me. Code Below I create a class. I save it to a session variable. Then, I retrieve the session variable back into a new local variable. I am able to use a method which...
3
by: Mikip | last post by:
Hi, I have some properties that are common to all pages so I have created a base class which every page inherits from. I now also want to use these properties within User Controls on the page....
2
by: Colin Robinson | last post by:
Help please I have an example class called Person with 2 public properties Firstname and Lastname, I cant create a textbox on an asp.net form bound to the Person.Firstname property Can...
2
by: Chris | last post by:
Hi, I am building a single webform/webpage asp.net application using VB.NET. I have created lots of classes for this web application. On page load I use a facade controller pattern class to...
8
by: Bruno Alexandre | last post by:
Hi guys, I'm using a session to save an ArrayList, so I do not read Database everytime user reload the page or enter the site (the Data is consistent for all entire session time when the user is...
0
by: paulbearden | last post by:
Greetings, I'm fairly new to .net (especially 2.0). I using vb.net, 2.0 framework and Visual Studio 2005. I'm trying to create a class with a member that will iterate through a web page and...
12
by: =?Utf-8?B?RnJlZU5FYXN5?= | last post by:
Hello, the scenario: There's an ASPX page which shows some text and has three buttons at the bottom: Save, Print and Close. Print and close is done by javascript. But how can I save the page...
1
by: ggraham | last post by:
I'm a semi-newbie to .NET. I've create a class to handle getting data on a person. It has a couple of properties and a new and save subroutine. I'm loading the data in the page_load even of my...
7
by: Andy B | last post by:
I have a class I am creating for data access. I need to access controls from inside the class that are on a particular page. How do I do this? or is creating an instance of the page class and using...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.