---
title: "Session variable in Java script"  
description: "Session variable in Java script"  
author: "Anonymous User"  
published: 2010-10-15  
updated: 2010-10-15  
canonical: https://www.mindstick.com/forum/43/session-variable-in-java-script  
category: "javascript"  
tags: ["javascript"]  
reading_time: 1 minute  

---

# Session variable in Java script

[Please explain](https://www.mindstick.com/forum/344/hi-rohith-i-am-new-for-mvc-please-explain-how-to-set-implicitly-isauthenticated-true) about how to read a [session variable](https://www.mindstick.com/forum/12804/how-to-set-a-asp-dropdownlist-selectedvalue-to-a-session-variable) in [JavaScript](https://www.mindstick.com/articles/874/how-to-create-watermark-text-for-textbox-by-using-javascript) which is defined externally.

Can we read this within the [page](https://www.mindstick.com/articles/13031/why-to-make-a-wikipedia-page)?

![Session variable in Java script](https://www.mindstick.com/app_images/htmleditor.icons/msp_crying.gif)\

## Replies

### Reply by Anonymous User

thank you ![Session variable in Java script](https://www.mindstick.com/app_images/htmleditor.icons/msp_thumbup.gif)\

### Reply by Uttam Misra

use global [variable](https://www.mindstick.com/articles/1807/objective-c-data-types-variables-object-creation) in your **ASPX** file : var sessionValue = '<%= [Session](https://www.mindstick.com/articles/12042/session-in-c-sharp)["YourKey"] %>'.

Now this global variable will be visible to the external JavaScript files that's included in the page.\

You can use "sessionValue" as you need.


---

Original Source: https://www.mindstick.com/forum/43/session-variable-in-java-script

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
