freemarker 页面怎么获取Session中的值

2025-05-13 13:55:27
推荐回答(2个)
回答(1):

  session可以看成一个数组,只是数组的下标是数字,比如a[1],而session下标是一个字符串,也就是他的key值。
  获取session值:
  string strSession = Session["user_name"].ToString();
  就这麼简单。

回答(2):

其实,直接就取出来了
<#if user?exists>