I want to access asp.net(C#) session value in angularjs file, what should be the best way to access session value.
What i tried, but couldn't able to get it.
$session.get(key)
ASP.NET is backend and Angular runs in the browser. ;-)
You have several options:
write the session into a cookie (if not already done by ASP.NET) and read the value via the angular-cookies library
write a RESTful service to get some session information value
render the value into a hidden field and read it via jquery
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With