分类:
.NET Core
//1.在session后面输入SetString 需要存储的值
//2.在Startup.cs中找到 ConfigureServices 这个方法并在该类中添加(ConfigureServices :用来配置应用程序上的各种服务)
//添加 services.AddSession();
//3在Startup.cs 中找到Configure 方法并添加中间件 app.UseSession();(Configure :用来添加中间件)
//存session的值
HttpContext.Session.SetString("username", "aa");
//取session的值
string values= HttpContext.Session.GetString("username");评价
排名
6
文章
6
粉丝
16
评论
8
{{item.articleTitle}}
{{item.blogName}} : {{item.content}}
ICP备案 :渝ICP备18016597号-1
网站信息:2018-2025TNBLOG.NET
技术交流:群号656732739
联系我们:contact@tnblog.net
公网安备:
50010702506256
50010702506256
欢迎加群交流技术