Click here to Skip to main content
15,891,375 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Is it possible to create a Session variable in JS and then retrieve it in code-behind? Or create a session variable, and then set its value in JS? Thanks.
Posted
Updated 25-Sep-15 9:21am
v2

 
Share this answer
 
No. Session is a server-side concept only.

The only way to set a variable like that is for the javascript code to call a method on the server (AJAX'ish) and tell it what value to set in the Session.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900