Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 277
  • Last Modified:

Session in C#

Hi,

Is there any way I can detect in Javascript whether the session in server side is still alive without postback to server.

I using ASP.NET and C# as code behind.
0
wainc51
Asked:
wainc51
2 Solutions
 
ihenryCommented:
I'm afraid the answer is no. There're might be a workaround if you can elaborate more on what are you trying to achieve.
0
 
SicosCommented:
No you can't...

When you do a postback the session will always be alive because it's new created when the other session has ended...

Probally the only thing you can do is use some kind of timestamp in your page and look if the time is later than the timestamp + the session timeout


Greetings,
Sicos
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now