title: How to set Password and Username in web.config
body: <p>In my MVC Application I use the connection string is set in the Web.config via </p>
  
  <pre><code>Private connectionString As String = ConfigurationManager.ConnectionStrings("DBCS").ConnectionString
  </code></pre>
  
  <p>and have no problems with my db connection. But since I need a password and username to log into my database I hardcoded that in the web.config </p>
  
  <pre><code>&lt;connectionStrings&gt;
      &lt;add name="DBCS" connectionString="server=win\SQLExpress;database=myDb; uid=myUsername;password=myPassword" providerName="System.Data.SqlClient" /&gt;
    &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>I am looking for a way to send the password and username from the userinterface to the config.web file first off I thought the ConfigurationManager Class should provide a property for that but I cannot find something. Can anyone explain to me how to do this?</p>