pros and cons to use session in ASP.NET
First things first, I'm just a starter.
It seems that Session is something MS not recommend anymore, by using
RESTFUL website, model would always be the first choice to submit all the
values, and maybe in the future they will remove that concept
But, my question is, you cannot rely on model to store everything about
users, there must be some case session will be the best way, for example:
there is a payment list page and session will be the best way to store the
keywords, Caz every time use click page number, they don't submit to
controller, so there is no way to get those information by server
side(they not passed at all).
If we building a online shopping site by ASP MVC, the session can also be
used as cart, if we store in database.
So I'm kind of confusing whether or not to use session, can any body give
me some ideas about the best practices of session?
No comments:
Post a Comment