List all session info

前端 未结 3 1229
天命终不由人
天命终不由人 2021-02-18 23:53

I want to display all the session information of my asp.net page (aspx) in the page. How can I do that?

The programming language is C#.

3条回答
  •  故里飘歌
    2021-02-19 00:41

    Display in listbox ( Adding for personal reference)

     int[] array = new int[400];
                for (int i = 0; i < Session.Count; i++)
                {
                    var crntSession = Session.Keys[i];
                    lstbx.Items.Add(crntSession + "=" + Session[crntSession] + "
    "); }

提交回复
热议问题