Consistent SessionID C#

I am trying to get the SessionID using Session.SessionID.ToString()
But everytime the code is fired it gives a different ID but I expected it to stay the same while ever the browser window remained.

What I want is a sustainable ID that I can reference while I user is entering a form. then after the form is completed I would flush the session to force a new one created.

How can I do that with the code?

Thanks in advance,
Who is Participating?
andrewmilnerConnect With a Mentor Author Commented:
I had no Global.asax file in my build which seampt to be the problem.
It should stay the same  - can we see some code?
Are you resetting your App pool each time the code runs? Doesn't matter if the same browser window remains open, if the App pool gets restarted or recycled, you're going to lose that information.
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.

All Courses

From novice to tech pro — start learning today.