I'm passing a value in local storage from one view and i want to call this value in another view in c# function. Both action results are in same controller. I don't know how to call this local storage value in c# can any one help me ?
view1.cshtml:
<script>
...
var audioElement = document.getElementById(audioId);
// Check browser supporta
if (typeof (Storage) !== "undefined") {
//Store
localStorage.setItem("audiourl", audioElement);
//Retrieve
document.getElementById("result").innerHTML = localStorage.getItem["audiourl"];
}
</script>
<div id="result"></div>
By doing this value has been passed, now how to receive this value from localstorage
in another view in c# function as a parameter.
Local storege is on the client-side. It isn't sent to the server, and cannot be accessed from server code.
If you need it in your server code, you'll have to explicitly send it yourself.
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