Ways to pass data for asp.net website

  1. ViewState – Maintain data for postback for a page
  2. Context items collection – Simple data pass from 1 page to another. (common use for server farm)
  3. QueryString – put value in the URL
  4. Session – Server store value per user (example: user id)
  5. Application – For the whole web application
  6. Cache – Server storing data among all users (example: the product table)
  7. Cookie – Store information on the user’s pc for a long time (example: track first time visit)
  8. PreviousPage object

…and others

No comments yet

Leave a reply