I need to find a way to get or set data, to or from localStorage
or sessionStorage
using C#. Is there a way to do this ?
Directly no. They're both client side and only accessible through JavaScript they never end up being serialised back to the server where the C# runs.
However, you could use JavaScript and have it talk to the C# side using AJAX or some such.
You can do it from JavaScript. refer below link for the same :
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.