title: How to set localstorage in ASP.NET
body: <p>I'm working in a solution in ASP.NET</p>
  
  <p>I have my login .cshtml page with that code:</p>
  
  <pre><code>if (WebSecurity.Login(email, password, rememberMe)) {
              string token = Convert.ToBase64String(Guid.NewGuid().ToByteArray());
          var db = Database.Open("BBDD");
          // Insertar token
          db.Execute("INSERT INTO token (token,date) VALUES ("+token+","+DateTime.Now+"");
           localStorage.setItem("var.token", token);
  
          Context.RedirectLocal(returnUrl);
          return;
      } else {
          ModelState.AddFormError("Error");
      }
  </code></pre>
  
  <p>I want to set a token in the localstorage.</p>
  
  <p>How Can I do it?</p>
  
  <p>Thanks in advance.</p>