I am developing an asp.net web application. I need to use java script to assign variables to the session variable. How can i use javascript to assign a value to a session variable ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
you cannot set session variables directly from Javascript. However you can use Ajax to set session variables. Pass the value to be set to a web method which sets it and it will become accessible as a session variable.