Instead of using sessions can I use a server side object in .Net instead of sessions etc.

Posted on 2005-04-27
Last Modified: 2010-04-07
Is there a .Net equvialent java bean object that I can use server side to hold form data in an object.
Question by:Sparky191
    LVL 6

    Accepted Solution

    You can use
    * Application("whatever")=value - which would hold for all the users of that system (global variable for all users)
    * Cache object which is a recent introduction to ASP (in .NET( which is same as sessions but server-side), works for all users of the system). Example for Cache :
    LVL 1

    Author Comment

    Appreciate the info, thanks...
    LVL 23

    Assisted Solution

    There are various object to hold information about form data.
    1. ViewState is a client-server object. It resides on the client but is recreated on the server across every postback. Lifetime is constrained to be that of the page (as long as the browser has not closed the page and cleared the cache!). Scope is only that page.
    2. Session is across all pages for that user using that Session. Thus, a user can have two separate browser windows, and have consequently two separate sessions (if the re-use process in MSIE is switched off when using control+n...). The lifetime of the session is determined by the System. By default, it is 20 mins
    3. Cache is across all pages for ALL users and is visible to all. Lifetime of cache objects is determined largely by the settings used in creating the cache item as well as the available resources on the server. In short, the period can often be indeterminate in the sense that if you set the expiry datetime to be every day, the data could technically be flushed out more often than was set because of resource limitations. So one has to code to repopulate the cache item if it is empty when called. As opposed to all other items, the Cache object allows you to set dependencies on files. In ASP.NET 2.0, you can even set dependencies on the MSSQL Server.
    4. Application objects do not get flushed unless the application is unloaded.

    The best object depends on your needs and the server configuration: whether there is a web farm (multiple servers) and/or a web garden (multiple processors). Where the worker process runs in-process (fast) or out of process (scalable).
    LVL 26

    Assisted Solution

    u could create ur own class and use serialization to store the isntance of the class (object) onto ur disk too ...
    LVL 1

    Author Comment

    Thanks for the info. I can work with what you've given. Me Thanks.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now