Session simple application

Development tools and key technologies: vs, MVC
Author: Chen Xingyu
wrote Time: April 13

About Session, we are very familiar with, we use a lot of things will be used Seesion,
but the biggest advantage Seesion is a wide range, it can store variables
that we can get the entire project to a Session variable storage
when it comes to storing data we to put the required data into Seeion, we can use it
Here Insert Picture Description
at this time in our Sesion have a user ID,
then we can use it, give the simplest example is redirected
before entering each module We had to redirect once, Session scope is very wide, wide enough to
contain our entire module,
so in order to secure our projects, into each module must be judged his user ID
and user ID whether you logged in equal, otherwise it will log on to the page of
Here Insert Picture Description
the user ID of the user that he is our Id stored in Session
and enter the user ID of the page we used to use directly on the line, you do not have to continue to search inside the database
Here Insert Picture Description
through one such format to receive data Session of the
thus received login pass over the UserID, we can know by entering The identity of the user
Here Insert Picture Description
and the data we use in Sesion when you can just declare the use of the contents inside the

Seesion range is very wide, wide to us can be used in the project
Here Insert Picture Description
from the above chart can be seen in the cross-Session controller, and across pages can be easily transported, in my opinion Session of transport across the page is simple the range, from the data stored in the direct extraction of the Session

Guess you like

Origin blog.csdn.net/tianxiu11/article/details/89298955