How to access Session variables and set them in javascript without using viewbag in .net core 3.1?

Viewed 53

I have been trying to access the session values in the javascript

I have tried using

var someSessionVariable = '@Session["SomeSessionVariable"]'

but no luck in accessing the values

0 Answers
Related