473,387 Members | 1,859 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,387 software developers and data experts.

State Management

Can collection classes be used to store session data? In a couple of books on
ASP.Net where they discuss state management (to capture a user's input data),
they talk about session and application objects, cookies, statebag, etc.

But if I have a checkboxlist, can't I just iterate through the selected
items and store them in a collection class for use in later pages in the web
app? Would there be implications of doing it this way?

Thank you,
Richard
Nov 18 '05 #1
2 1216
The only issue to be aware of (in your collection scenario) is
serialization. If the collection that you put the objects is not
serializable you'll get an exception if someone decides to activate SQL
or Out-Of-Process session state as these session storage methods
serialize the object across process boundaries when storing and
retrieving the data. Of course this assumes that you use session to
temporarily store state.

You mentioned other ways of storing the user data each has its own
issues. You don't want to use the application level storage for
handling the storage of user specific data as you're giving every user
potential access to every other user's data, not to mention that the
data will stick around in memory until the application ends or you take
pains to shut it down. If you are looking at cookies you'll need to
make a call on how much data you want to store and transmit across the
line between the user and the server.

We've found that on the whole using serializable data containers to
store data in Session seems to be the most flexible and manageable
solution to temporary storage of state. We usually abstract the calls
to state storage in a wrapper class so that we can change the storage
methodology as our needs dictate (i.e. custom storage repository,
security requirements...).

Have A Better One!

John M Deal, MCP
Necessity Software

Richard wrote:
Can collection classes be used to store session data? In a couple of books on
ASP.Net where they discuss state management (to capture a user's input data),
they talk about session and application objects, cookies, statebag, etc.

But if I have a checkboxlist, can't I just iterate through the selected
items and store them in a collection class for use in later pages in the web
app? Would there be implications of doing it this way?

Thank you,
Richard

Nov 18 '05 #2
John, thank you for this info!

"John M Deal" wrote:
The only issue to be aware of (in your collection scenario) is
serialization. If the collection that you put the objects is not
serializable you'll get an exception if someone decides to activate SQL
or Out-Of-Process session state as these session storage methods
serialize the object across process boundaries when storing and
retrieving the data. Of course this assumes that you use session to
temporarily store state.

You mentioned other ways of storing the user data each has its own
issues. You don't want to use the application level storage for
handling the storage of user specific data as you're giving every user
potential access to every other user's data, not to mention that the
data will stick around in memory until the application ends or you take
pains to shut it down. If you are looking at cookies you'll need to
make a call on how much data you want to store and transmit across the
line between the user and the server.

We've found that on the whole using serializable data containers to
store data in Session seems to be the most flexible and manageable
solution to temporary storage of state. We usually abstract the calls
to state storage in a wrapper class so that we can change the storage
methodology as our needs dictate (i.e. custom storage repository,
security requirements...).

Have A Better One!

John M Deal, MCP
Necessity Software

Richard wrote:
Can collection classes be used to store session data? In a couple of books on
ASP.Net where they discuss state management (to capture a user's input data),
they talk about session and application objects, cookies, statebag, etc.

But if I have a checkboxlist, can't I just iterate through the selected
items and store them in a collection class for use in later pages in the web
app? Would there be implications of doing it this way?

Thank you,
Richard

Nov 18 '05 #3

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

Similar topics

4
by: Chad Crowder | last post by:
I've taken a look at this article http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspnet/html/asp12282000.asp which someone posted a month or so ago regarding setting up SQL...
2
by: John A Grandy | last post by:
for high traffic public websites , what are the proven options for session-state storage & management ? is an out-of-process state-server generally preferred over a sql-server ? what are the...
1
by: John Grandy | last post by:
Could someone point me in the direction of good discussions on scalable state management solutions? Specifically, pros and cons of following strategies: Strategy 1 : temporary business-objects...
2
by: geodev | last post by:
Hello, I’m currently writing an asp.net application that will be running on a Windows XP Professional workstation utilising IIS and MSDE Database. At a later date this application will need to...
13
by: James Hunter Ross | last post by:
We love the ASP.NET "Session" concept and make good use of it. But, getting close to deployment we find we lose sessions far too often, probably due to application restarts, etc. We hope to...
0
by: Shell | last post by:
Hi All, We have an application that uses SQL Server 2000 for State Management data. We previously use to build and deploy this application using ASP.NET Beta 2 version. Now we are using ASP.NET...
5
by: knyghtfyre | last post by:
Hello, My company is developing a rather large application with .NET 2.0. We are expanding to a server farm and are in the process of converting our application to use an out-of-process session...
4
by: =?Utf-8?B?Z3V5?= | last post by:
Is this a valid approach to State Management? What I do is define a class 'State' which holds all the objects etc. that I need to store in the Session. I can then get my state object and...
0
by: kirk | last post by:
I have three events that I have created and manage with timers. Two of the timer event handlers, the last two in the code below, need to reset state management data, if the first event handler...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
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...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
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,...
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...

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.