I am currently setting/getting localstorage values via javascript which works fine. However I would like to get the values out of localstorage in my controller or somewhere else in the request pipeline via server side code. (Similar to how the Request.Cookies comes back from the HttpContext)
Does anyone know where the localstorage is hidden? I can see it in firebug/chrome so I know its set fine and I can pull it out via javascript.
You can get/set the localStorage value by using the getItem / setItem method in the window. localStorage .
localStorage remains on the client side, and is not transferred in the request.
If you want to transfer any localStorage information to the server, you will need to get the values you want, and then either place them into hidden fields on your form, or use some other means (such as JSON) to transfer the values to the server.
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