Answers for "check if session is available c#"

C#
6

check if session is set

if (isset($_SESSION["userid"])) {
	echo "Logged in";
} else {
	echo "Not Logged in";
}
Posted by: Guest on September-04-2021
0

mvc session key exists

if (System.Web.HttpContext.Current.Session["company_path"]!= null)
{
      company_path = System.Web.HttpContext.Current.Session["company_path"].ToString();
}
else
{
      company_path = "/reflex/SMD";
}
Posted by: Guest on April-06-2020

Code answers related to "check if session is available c#"

C# Answers by Framework

Browse Popular Code Answers by Language