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