[英]how to get or set localStorage or sessionStorage storage using c#?
I need to find a way to get or set data, to or from localStorage
or sessionStorage
using C#. 我需要找到一种方法来使用C#从
localStorage
或sessionStorage
获取或设置数据。 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.
它们既是客户端又只能通过JavaScript访问,它们永远不会被序列化回C#运行的服务器。
However, you could use JavaScript and have it talk to the C# side using AJAX or some such. 但是,您可以使用JavaScript并使用AJAX或其他方式与C#端进行通信。
You can do it from JavaScript. 你可以用JavaScript做到这一点。 refer below link for the same :
请参阅以下链接:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.