Hi All,
I am creating a web application using ASP.Net. I am using session in my application.
There is one scenario where I am trying to access session variable through Javascript. It is working fine, when I m accessing it in normal state. But after session expiry, if click on any button, it throws exception and behaves abnormally, resulting in page not found.
Here is the code I am using;
var TransactionID = '<% =((Hashtable)(Session["SessionData"]))["TransactionID "] %>';
if(TransactionID !='')
{
//action
}
I am trying to achieve something like of sort in c#;
String lsStr;
if(null != lsStr)
{
//action
}
Please help me, if anyone knows how to check if session exists or not using javascript.
Thanks in advance.