Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Best way to maintain web application state?

Best way to maintain web application state?

Scheduled Pinned Locked Moved ASP.NET
questioncsharphtmlasp-net
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rip Kirby
    wrote on last edited by
    #1

    Hi, I´m a really confused about what is the best way to maintain asp.net page state (viewstate, session, profiles): Nr 1: are all objects destroyed when a page request has finished and returned the html/aspx page? If that’s the case it conveys that I have to re-create all objects when a new request is made and “re-fill” objects with values? Or?  Nr 2: What is the usual way to “save” a users state variables? Regards /Christoffer

    I 1 Reply Last reply
    0
    • R Rip Kirby

      Hi, I´m a really confused about what is the best way to maintain asp.net page state (viewstate, session, profiles): Nr 1: are all objects destroyed when a page request has finished and returned the html/aspx page? If that’s the case it conveys that I have to re-create all objects when a new request is made and “re-fill” objects with values? Or?  Nr 2: What is the usual way to “save” a users state variables? Regards /Christoffer

      I Offline
      I Offline
      indianet
      wrote on last edited by
      #2

      For information that needs to tracked across multiple post backs a) Use View State - If the information is tied to a single page & If the information consists of fewer bytes b) Use Profile - If the information represents specific to the logged user on the whole rather than a page or group of page c) Use Session - Information that needs to be tracked for the user, that applies to your application on the whole again use session variables, again you may not want more than few 100 bytes of information as part of session d) Database - If you need to track information for ordering of records and if you have few thousands records always re-request it from the database instead of storing it in session variables e) Cache - If information is common across all connected users.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups