title: Store username password in browser's localstorage using c#
body: <p>I'm developing a mobile oriented website using asp.net. This website will consume some web services requiring username and password to be send for each call. For this, I will need to store the credential that the user will use on the login form, on the client. What are the best practices?</p>
  
  <p>I wonder how I should save the username and password locally keeping an acceptable level of security. </p>
  
  <p>I was thinking about encrypting the credentials in C# and then store the encrypted value in the localStorage of the browser. Would it be "secured" ?</p>
  
  <p>Other question, is it possible to store in the localStorage using C# to trigger JavaScript?</p>
  
  <p>Thanks.</p>