.NET中会话的用途是什么 [英] What is use of session in .NET

查看:95
本文介绍了.NET中会话的用途是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不明白如何在代码中使用会话



我尝试过:



i不明白如何在代码中使用会话

i dont understand that how to use session in code

What I have tried:

i dont understand that how to use session in code

推荐答案

ASP.Net提供会话来存储或检索用户的值。

这些链接可以帮助您入门。

ASP.NET会话状态概述 [ ^ ]

ASP会话对象 [ ^ ]

http://asp.net-tutorials.com/state/sessions/ [ ^ ]
ASP.Net provides sessions to store or retrieve values for a user.
These links should help you get started.
ASP.NET Session State Overview[^]
ASP Session object[^]
http://asp.net-tutorials.com/state/sessions/[^]


会话基本上,对每个用户和应用程序运行时都是唯一的。当用户开始使用该应用程序时,会话会被创建并且可以终止:



1.当用户离开应用程序时。

2.当应用程序的业务逻辑需要时。



ASP.NET提供了一种非常简单的方法来管理它。这是当您使用 Session 变量来操纵用户输入的值时,短时间内保存的应用程序数据。您可以将会话变量视为临时变量,一旦用户导航,或者应用程序决定关闭会话,该变量就会被删除。唯一的区别是会话对于应用程序+用户是唯一的。



有关此内容的更多信息,

http://asp.net-tutorials.com/state/sessions/ [ ^ ]

ASP.NET会话状态概述 [ ^ ]
Sessions are basically, unique for every user and the application runtime. When a user starts using the application, a session is created and it can terminate:

1. When user leaves the application.
2. When application's business logic wants to.

ASP.NET provides a very easy way of managing this. That is when you use the Session variables to manipulate what values users enter, what application data is saved for the short time. You can think of the session variables as a temporary variable that gets removed once the user navigates away, or application decides to close the session. The only difference is that a session is unique to application + user.

For more on this,
http://asp.net-tutorials.com/state/sessions/[^]
ASP.NET Session State Overview[^]


这篇关于.NET中会话的用途是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆