On a aspx page, I have to load a DropDown with some values coming from the DB. What is most correct place to put the data to keep value during the page lifecycle?
Cahce Object?
Session?
ViewState?
More details:
- This data are stored inside a DataTable
- The rows can be also 200
- The data are all string used to filted gridView items
Cache if the data is expensive to obtain and is the same for all users.
Session if the data is expensive to obtain and depends on the user
Nothing if the data is cheap to obtain.
ViewState if the data is in an admin page or somewhere where the traffic does not matter (internal website, rarely accessed page). 200 rows is probably a bit too much though.