Reputation: 541
Is there an easy way to see what session variables exist and their values using Visual Studio running an MVC3 application in debug mode.
Thanks
Upvotes: 0
Views: 362
Reputation: 1185
You could output something like this:-
foreach (string key in Session.Keys)
{
Response.Write(key + " - " + Session[key] + "<br />");
}
Upvotes: 1
Reputation: 3177
Of course, it's a "normal" ASP.NET application:
Try Request.RequestContext.HttpContext.Session
Normally you can use "Session" directly, e.g.
Session["key"]
You may try it in an immediate window in debug mode ...
Upvotes: 0