Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

Is using Session variable to store temp data good or bad?

$
0
0

Hello.

I need to store some temporary data to pass it between aspx files before saving it to database. I wonder which approach is better:

  1. To store all data initially in database with some flag set to false (IsDataSaved = false for example), this approach produce a lot of unnecessary data which I would like to avoid
  2. Use Session[] dictionary, store all data there, and only when user saves the changes - save data to database

Is Session variable even intended for something like this? Or is there some other approach?

Thanks in advance.

Best regards.

 


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>