Session Variables - Saving with XML
page 4 of 4
by Keith Barrows
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 22158/ 39

Summary

[Download Code]

Dealing with session state and variables can get pretty messy, especially in larger apps.  Having a standard way of tracking all of that information makes your job as a developer much easier. 

Session State is one way of maintaining state across several pages and even across post-backs on a single page.  Use it wisely.  This is just another arrow in your application state quiver.


View Entire Article

User Comments

Title: zzc   
Name: zcc
Date: 2012-08-01 6:53:38 AM
Comment:
zc
Title: Problem   
Name: Mohammad
Date: 2005-10-07 2:24:29 AM
Comment:
sample cant run
Title: Are you nuts?   
Name: Curious
Date: 2004-12-22 9:50:48 PM
Comment:
"Whatever the reasons, you need to save session state and are concerned about over-filling the memory."

So, you add on all the extra xml tags and the xmldocument with its collections of nodes to work with and that is somehow less memory intensive?

"Storing a full blown object in memory was not saving us much in the way of memory footprint."

Everything in .NET is an object/class. Strings included.

If you really needed to convert your session values to xml. You would create a class with properties that get/set your session variables in the get/set statements and convert the session values to the proper .NET datatype.

Then, use the System.Xml.Serialization.XmlSerializer to quickly and easily convert the class properties to an xml string.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-20 10:54:47 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search