Reputation: 471
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 ?
Upvotes: 0
Views: 3277
Reputation: 10122
You can do it from JavaScript. refer below link for the same :
Local Storage and Session Storage
Upvotes: 1
Reputation: 29668
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.
Upvotes: 1