Home > MVC > How to access c# session variable in javascript



How to access c# session variable in javascript

In this article, we have described how to access c# session variable in javascript with an example and sample code.


In this article, we have described how to access c# session variable in javascript with an example and sample code. In this example, we will get session variable value using javascript on window.onload function.

 

HTML

 

HomeController

We are set session in HomeController.

 

Screenshot

How to access c# session variable in javascript

 




Note: All contents are copyright of their authors.



Comments



Leave a Reply

Comment:*
Email ID:*


Name:*