Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is there any way to set Session in .aspx page in <script></script> tag ?
Posted
Updated 8-Aug-14 23:14pm
v3

A session is created automatically.
EnableSessionState[^] is used to enable or disable a session.

If you are searching for using a session, try here[^].
 
Share this answer
 
Hi,

Its not possible to set session variables directly through javascript, session can only be set from code behind.
Either fire a server side event directly or make a ajax postback call.

refer:-

JavaScript - How to Set values to Session in Javascript[^]
Jquery-Post[^]

hope this helps.
 
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