Answer: With the help of Session.Keys property,
we can get all the keys.
For Example:-
Session["Name"] = "Vishal";
Session["Phone_No"] = "123455667";
foreach (string key in Session.Keys)
{
Response.Write(key + "<br/>");
}
It will return:Name and Phone_No
Asked In: Many Interviews |
Alert Moderator